return_bestModelObject(), calcWeightedMAPEscore() を用いて重み付きMAPEの結果を出す
train_lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343] train_lulesh_iterations: list[int] = [8, 16, 32, 64, 128] train_lulesh_sizes: list[int] = [16, 24, 32, 48, 64]
test_lulesh_processes: list[int] = [512] test_lulesh_iterations: list[int] = [256] test_lulesh_sizes: list[int] = [128]
input_list_expVarNames: list[str] = ["process", "iteration", "size"] input_list_resVarNames: list[str] = ["#Call"]
list_modelName: list[str] = [ "modelIp", "modelLog", "modelLinAndIp", "modelLinAndLog", "modelIpAndLin", "modelIpAndLog", "modelLogAndLin", "modelLogAndIp", "modelProcessDividedByProblemSize", "modelProblemSizeDividedByProcess", "modelLinearSumOf2elementCombination", "modelLinearSumOfElementCombinations", "modelLin" # "modelBasicTree", ]
input_rawDF_train: pd.DataFrame = return_rawDFinLULESH( processes=train_lulesh_processes, iterations=train_lulesh_iterations, sizes=train_lulesh_sizes, csvDirPath=csvDirPath, ) input_rawDF_test :pd.DataFrame = return_rawDFinLULESH( processes=test_lulesh_processes, iterations=test_lulesh_iterations, sizes=test_lulesh_sizes, csvDirPath=csvDirPath )
input_rawDF_train = input_rawDF_train.rename(columns={"Name":"functionName"}) input_rawDF_test = input_rawDF_test.rename(columns={"Name":"functionName"}) functionNames :list[str] = list(set(input_rawDF_train["functionName"]))
list_series :list[pd.Series] = []
for functionName in functionNames: input_rawDF_per_function_train :pd.DataFrame = input_rawDF_train[input_rawDF_train["functionName"] == functionName] input_rawDF_per_function_test :pd.DataFrame = input_rawDF_test[input_rawDF_test["functionName"] == functionName]
# return_bestModelObject()を利用し最適モデルでMAPEを出す
bestModelDict = return_bestModelObject(inputDF = input_rawDF_per_function_train, list_expVar=input_list_expVarNames, list_resVar=input_list_resVarNames, list_modelName=list_modelName)
# 最適モデルで予測対象の環境でのコール回数を予測
bestModel = bestModelDict["object"]
predicted = float(np.array(bestModel.predict(input_rawDF_per_function_test[input_list_expVarNames])))
# pd.series({"functionName":, "call":, "MAPE":, "predicted_call":})
_call :float = float(input_rawDF_per_function_test.iloc[0]["#Call"])
# print(f"returnMapeScore(l1=[{_call}], l2=[{predicted}])")
# print(f"type({_call}) = {type(_call)}, type(predicted) = {type(predicted)}")
_MAPE :float = float(returnMapeScore(l1=[_call], l2=[predicted]))
_series :pd.Series = pd.Series({"functionName":functionName, "call":input_rawDF_per_function_test.iloc[0]["#Call"], "MAPE":_MAPE, "predicted_call":predicted})
list_series.append(_series)
inputDF :pd.DataFrame = pd.concat(list_series, axis=1).T
inputDF
retNum :float = calcWeightedMAPEscore(inputDF=inputDF, inputColumnDict={"funcName":"functionName", "call":"call", "MAPE":"MAPE"})
retNum
重み付きMAPEの算出@NPB
train_npb_processes :list[int] = [2,4,8,16,32,64,128] train_npb_sizes :list[str] = ["A", "B", "C"]
test_npb_processes :list[int] = [256] test_npb_sizes :list[str] = ["D"]
list_modelName: list[str] = [ "modelIp", "modelLog", "modelLinAndIp", "modelLinAndLog", "modelIpAndLin", "modelIpAndLog", "modelLogAndLin", "modelLogAndIp", "modelProcessDividedByProblemSize", "modelProblemSizeDividedByProcess", "modelLinearSumOf2elementCombination", "modelLinearSumOfElementCombinations", "modelLin" # "modelBasicTree", ]
benchmarkName :str = "cg"
input_rawDF_train :pd.DataFrame = return_rawDF_with_init_param( benchmark_name=benchmarkName, classes=train_npb_sizes, processes=train_npb_processes ) input_rawDF_test :pd.DataFrame = return_rawDF_with_init_param( benchmark_name=benchmarkName, classes=test_npb_sizes, processes=test_npb_processes )
input_expVar :list[str] = input_rawDF_train.columns.tolist() for element_be_removed in [ "functionName", "functionCallNum", "intBenchmarkClass", "benchmarkName", "benchmarkClass", ]: input_expVar.remove(element_be_removed) input_resVar :list[str] = ["functionCallNum"] functionNames :list[str] = list(set(input_rawDF_train["functionName"]))
list_series :list[pd.Series] = []
for functionName in functionNames: input_rawDF_per_function_train :pd.DataFrame = input_rawDF_train[input_rawDF_train["functionName"] == functionName] input_rawDF_per_function_test :pd.DataFrame = input_rawDF_test[input_rawDF_test["functionName"] == functionName]
bestModelDict = return_bestModelObject(inputDF=input_rawDF_per_function_train, list_expVar=input_expVar, list_resVar=input_resVar, list_modelName=list_modelName)
bestModel = bestModelDict["object"]
predicted = float(np.array(bestModel.predict(inputDF=input_rawDF_per_function_test[input_expVar])))
_call :float = float(input_rawDF_per_function_test.iloc[0]["functionCallNum"])
_MAPE :float = float(returnMapeScore(l1=[_call], l2=[predicted]))
_series :pd.Series = pd.Series({"functionName":functionName, "call":_call, "MAPE":_MAPE, "predicted_call":predicted})
list_series.append(_series)
inputDF :pd.DataFrame = pd.concat(list_series, axis=1).T
retNum :float = calcWeightedMAPEscore(inputDF=inputDF, inputColumnDict={"funcName":"functionName", "call":"call", "MAPE":"MAPE"})
retNum
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
warnings.simplefilter("ignore")
重み付きMAPEを算出する関数を実装
test_calcWeightedMAPEscore()
最適モデルを返す関数を実装
各ベンチマークプログラムの入力に対して重み付きMAPEを算出する関数
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLin"
# "modelBasicTree",
]
# LULESH
train_lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343]
train_lulesh_iterations: list[int] = [8, 16, 32, 64, 128]
train_lulesh_sizes: list[int] = [16, 24, 32, 48, 64]
test_lulesh_processes: list[int] = [512]
test_lulesh_iterations: list[int] = [256]
test_lulesh_sizes: list[int] = [128]
weightedMAPEatLULESH: float = returnWeightedMapeScoreFromCondition(
benchmarkName="lulesh",
trainCondition={
"processes": train_lulesh_processes,
"iterations": train_lulesh_iterations,
"sizes": train_lulesh_sizes,
},
testCondition={
"processes": test_lulesh_processes,
"iterations": test_lulesh_iterations,
"sizes": test_lulesh_sizes,
},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatLULESH
99.34434422023138
# NPB
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["D"]
weightedMAPEatCG: float = returnWeightedMapeScoreFromCondition(
benchmarkName="cg",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatCG
174.81351700577324
weightedMAPEatIS: float = returnWeightedMapeScoreFromCondition(
benchmarkName="is",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatIS
0.14096468916816277
weightedMAPEatEP: float = returnWeightedMapeScoreFromCondition(
benchmarkName="ep",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatEP
0.0
weightedMAPEatMG: float = returnWeightedMapeScoreFromCondition(
benchmarkName="mg",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatMG
7024.080516840863
warnings.resetwarnings()
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
train_lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343]
train_lulesh_iterations: list[int] = [8, 16, 32, 64, 128]
train_lulesh_sizes: list[int] = [16, 24, 32, 48, 64]
test_lulesh_processes: list[int] = [512]
test_lulesh_iterations: list[int] = [256]
test_lulesh_sizes: list[int] = [128]
input_list_expVarNames: list[str] = ["process", "iteration", "size"]
input_list_resVarNames: list[str] = ["#Call"]
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLin"
# "modelBasicTree",
]
input_rawDF_train: pd.DataFrame = return_rawDFinLULESH(
processes=train_lulesh_processes,
iterations=train_lulesh_iterations,
sizes=train_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF_test: pd.DataFrame = return_rawDFinLULESH(
processes=test_lulesh_processes,
iterations=test_lulesh_iterations,
sizes=test_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF_train_CalcElemVolume: pd.DataFrame = input_rawDF_train[
input_rawDF_train["Name"] == "Real_t_CalcElemVolume(const"
]
# print(input_rawDF_train_CalcElemVolume.columns.tolist())
print(input_rawDF_train_CalcElemVolume.sort_values("#Call", ascending=False).to_csv())
,Name,#Call,process,iteration,size 6,Real_t_CalcElemVolume(const,33816600.0,343,128,64 4,Real_t_CalcElemVolume(const,33816600.0,64,128,64 4,Real_t_CalcElemVolume(const,33816600.0,216,128,64 4,Real_t_CalcElemVolume(const,33816600.0,8,128,64 8,Real_t_CalcElemVolume(const,33816600.0,125,128,64 3,Real_t_CalcElemVolume(const,33816600.0,27,128,64 4,Real_t_CalcElemVolume(const,17039400.0,27,64,64 4,Real_t_CalcElemVolume(const,17039400.0,64,64,64 4,Real_t_CalcElemVolume(const,17039400.0,216,64,64 6,Real_t_CalcElemVolume(const,17039400.0,343,64,64 4,Real_t_CalcElemVolume(const,17039400.0,8,64,64 8,Real_t_CalcElemVolume(const,17039400.0,125,64,64 4,Real_t_CalcElemVolume(const,14266400.0,64,128,48 6,Real_t_CalcElemVolume(const,14266400.0,125,128,48 4,Real_t_CalcElemVolume(const,14266400.0,27,128,48 4,Real_t_CalcElemVolume(const,14266400.0,8,128,48 6,Real_t_CalcElemVolume(const,14266400.0,343,128,48 6,Real_t_CalcElemVolume(const,14266400.0,216,128,48 5,Real_t_CalcElemVolume(const,8650750.0,64,32,64 4,Real_t_CalcElemVolume(const,8650750.0,8,32,64 4,Real_t_CalcElemVolume(const,8650750.0,27,32,64 8,Real_t_CalcElemVolume(const,8650750.0,125,32,64 4,Real_t_CalcElemVolume(const,8650750.0,216,32,64 5,Real_t_CalcElemVolume(const,8650750.0,343,32,64 6,Real_t_CalcElemVolume(const,7188480.0,64,64,48 7,Real_t_CalcElemVolume(const,7188480.0,125,64,48 6,Real_t_CalcElemVolume(const,7188480.0,216,64,48 4,Real_t_CalcElemVolume(const,7188480.0,27,64,48 6,Real_t_CalcElemVolume(const,7188480.0,343,64,48 4,Real_t_CalcElemVolume(const,7188480.0,8,64,48 4,Real_t_CalcElemVolume(const,4456450.0,8,16,64 4,Real_t_CalcElemVolume(const,4456450.0,27,16,64 7,Real_t_CalcElemVolume(const,4456450.0,125,16,64 5,Real_t_CalcElemVolume(const,4456450.0,216,16,64 4,Real_t_CalcElemVolume(const,4456450.0,64,16,64 6,Real_t_CalcElemVolume(const,4456450.0,343,16,64 9,Real_t_CalcElemVolume(const,4227070.0,125,128,32 6,Real_t_CalcElemVolume(const,4227070.0,343,128,32 4,Real_t_CalcElemVolume(const,4227070.0,8,128,32 5,Real_t_CalcElemVolume(const,4227070.0,27,128,32 4,Real_t_CalcElemVolume(const,4227070.0,216,128,32 4,Real_t_CalcElemVolume(const,4227070.0,64,128,32 7,Real_t_CalcElemVolume(const,3649540.0,125,32,48 4,Real_t_CalcElemVolume(const,3649540.0,8,32,48 5,Real_t_CalcElemVolume(const,3649540.0,27,32,48 6,Real_t_CalcElemVolume(const,3649540.0,343,32,48 6,Real_t_CalcElemVolume(const,3649540.0,216,32,48 7,Real_t_CalcElemVolume(const,3649540.0,64,32,48 6,Real_t_CalcElemVolume(const,2359300.0,64,8,64 6,Real_t_CalcElemVolume(const,2359300.0,216,8,64 5,Real_t_CalcElemVolume(const,2359300.0,125,8,64 8,Real_t_CalcElemVolume(const,2359300.0,343,8,64 5,Real_t_CalcElemVolume(const,2359300.0,8,8,64 5,Real_t_CalcElemVolume(const,2359300.0,27,8,64 7,Real_t_CalcElemVolume(const,2129920.0,343,64,32 8,Real_t_CalcElemVolume(const,2129920.0,125,64,32 6,Real_t_CalcElemVolume(const,2129920.0,27,64,32 6,Real_t_CalcElemVolume(const,2129920.0,216,64,32 8,Real_t_CalcElemVolume(const,2129920.0,64,64,32 5,Real_t_CalcElemVolume(const,2129920.0,8,64,32 5,Real_t_CalcElemVolume(const,1880060.0,8,16,48 5,Real_t_CalcElemVolume(const,1880060.0,64,16,48 8,Real_t_CalcElemVolume(const,1880060.0,343,16,48 5,Real_t_CalcElemVolume(const,1880060.0,27,16,48 8,Real_t_CalcElemVolume(const,1880060.0,216,16,48 8,Real_t_CalcElemVolume(const,1880060.0,125,16,48 9,Real_t_CalcElemVolume(const,1783300.0,64,128,24 11,Real_t_CalcElemVolume(const,1783300.0,125,128,24 9,Real_t_CalcElemVolume(const,1783300.0,343,128,24 6,Real_t_CalcElemVolume(const,1783300.0,27,128,24 6,Real_t_CalcElemVolume(const,1783300.0,8,128,24 7,Real_t_CalcElemVolume(const,1783300.0,216,128,24 6,Real_t_CalcElemVolume(const,1081340.0,216,32,32 6,Real_t_CalcElemVolume(const,1081340.0,27,32,32 6,Real_t_CalcElemVolume(const,1081340.0,64,32,32 8,Real_t_CalcElemVolume(const,1081340.0,343,32,32 5,Real_t_CalcElemVolume(const,1081340.0,8,32,32 8,Real_t_CalcElemVolume(const,1081340.0,125,32,32 5,Real_t_CalcElemVolume(const,995328.0,27,8,48 8,Real_t_CalcElemVolume(const,995328.0,216,8,48 5,Real_t_CalcElemVolume(const,995328.0,8,8,48 8,Real_t_CalcElemVolume(const,995328.0,343,8,48 7,Real_t_CalcElemVolume(const,995328.0,64,8,48 8,Real_t_CalcElemVolume(const,995328.0,125,8,48 9,Real_t_CalcElemVolume(const,898560.0,64,64,24 9,Real_t_CalcElemVolume(const,898560.0,343,64,24 8,Real_t_CalcElemVolume(const,898560.0,216,64,24 9,Real_t_CalcElemVolume(const,898560.0,125,64,24 6,Real_t_CalcElemVolume(const,898560.0,8,64,24 6,Real_t_CalcElemVolume(const,898560.0,27,64,24 6,Real_t_CalcElemVolume(const,557056.0,64,16,32 5,Real_t_CalcElemVolume(const,557056.0,27,16,32 8,Real_t_CalcElemVolume(const,557056.0,343,16,32 5,Real_t_CalcElemVolume(const,557056.0,8,16,32 7,Real_t_CalcElemVolume(const,557056.0,216,16,32 9,Real_t_CalcElemVolume(const,557056.0,125,16,32 12,Real_t_CalcElemVolume(const,528384.0,125,128,16 6,Real_t_CalcElemVolume(const,528384.0,27,128,16 7,Real_t_CalcElemVolume(const,528384.0,343,128,16 6,Real_t_CalcElemVolume(const,528384.0,8,128,16 8,Real_t_CalcElemVolume(const,528384.0,64,128,16 8,Real_t_CalcElemVolume(const,528384.0,216,128,16 9,Real_t_CalcElemVolume(const,456192.0,125,32,24 9,Real_t_CalcElemVolume(const,456192.0,343,32,24 6,Real_t_CalcElemVolume(const,456192.0,8,32,24 8,Real_t_CalcElemVolume(const,456192.0,64,32,24 9,Real_t_CalcElemVolume(const,456192.0,216,32,24 6,Real_t_CalcElemVolume(const,456192.0,27,32,24 8,Real_t_CalcElemVolume(const,294912.0,125,8,32 5,Real_t_CalcElemVolume(const,294912.0,8,8,32 8,Real_t_CalcElemVolume(const,294912.0,64,8,32 5,Real_t_CalcElemVolume(const,294912.0,27,8,32 8,Real_t_CalcElemVolume(const,294912.0,343,8,32 8,Real_t_CalcElemVolume(const,294912.0,216,8,32 12,Real_t_CalcElemVolume(const,266240.0,125,64,16 8,Real_t_CalcElemVolume(const,266240.0,216,64,16 8,Real_t_CalcElemVolume(const,266240.0,64,64,16 8,Real_t_CalcElemVolume(const,266240.0,343,64,16 6,Real_t_CalcElemVolume(const,266240.0,27,64,16 6,Real_t_CalcElemVolume(const,266240.0,8,64,16 8,Real_t_CalcElemVolume(const,235008.0,64,16,24 6,Real_t_CalcElemVolume(const,235008.0,8,16,24 8,Real_t_CalcElemVolume(const,235008.0,27,16,24 12,Real_t_CalcElemVolume(const,235008.0,125,16,24 8,Real_t_CalcElemVolume(const,235008.0,216,16,24 8,Real_t_CalcElemVolume(const,235008.0,343,16,24 13,Real_t_CalcElemVolume(const,135168.0,125,32,16 8,Real_t_CalcElemVolume(const,135168.0,343,32,16 8,Real_t_CalcElemVolume(const,135168.0,64,32,16 8,Real_t_CalcElemVolume(const,135168.0,216,32,16 6,Real_t_CalcElemVolume(const,135168.0,8,32,16 8,Real_t_CalcElemVolume(const,135168.0,27,32,16 8,Real_t_CalcElemVolume(const,124416.0,216,8,24 8,Real_t_CalcElemVolume(const,124416.0,343,8,24 8,Real_t_CalcElemVolume(const,124416.0,64,8,24 6,Real_t_CalcElemVolume(const,124416.0,8,8,24 8,Real_t_CalcElemVolume(const,124416.0,125,8,24 8,Real_t_CalcElemVolume(const,124416.0,27,8,24 8,Real_t_CalcElemVolume(const,69632.0,343,16,16 8,Real_t_CalcElemVolume(const,69632.0,216,16,16 8,Real_t_CalcElemVolume(const,69632.0,27,16,16 9,Real_t_CalcElemVolume(const,69632.0,64,16,16 6,Real_t_CalcElemVolume(const,69632.0,8,16,16 13,Real_t_CalcElemVolume(const,69632.0,125,16,16 5,Real_t_CalcElemVolume(const,36864.0,8,8,16 8,Real_t_CalcElemVolume(const,36864.0,343,8,16 8,Real_t_CalcElemVolume(const,36864.0,216,8,16 8,Real_t_CalcElemVolume(const,36864.0,64,8,16 10,Real_t_CalcElemVolume(const,36864.0,27,8,16 8,Real_t_CalcElemVolume(const,36864.0,125,8,16
# Real_t_CalcElemVolume(const を3次元プロットする
import plotly.express as px
fig = px.scatter_3d(
input_rawDF_train_CalcElemVolume, x="iteration", y="size", z="#Call"
)
fig.show()
/usr/local/lib/python3.10/site-packages/plotly/io/_renderers.py:395: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
input_rawDF_train_CalcElemVolume_with_plan: pd.DataFrame = (
input_rawDF_train_CalcElemVolume
)
input_rawDF_train_CalcElemVolume_with_plan["plan"] = (
input_rawDF_train_CalcElemVolume_with_plan["iteration"]
* input_rawDF_train_CalcElemVolume_with_plan["size"]
* input_rawDF_train_CalcElemVolume_with_plan["size"]
* input_rawDF_train_CalcElemVolume_with_plan["size"]
)
input_rawDF_train_CalcElemVolume_with_plan["relative_error_rate"] = (
100
* abs(
input_rawDF_train_CalcElemVolume_with_plan["#Call"]
- input_rawDF_train_CalcElemVolume_with_plan["plan"]
)
/ input_rawDF_train_CalcElemVolume_with_plan["#Call"]
)
input_rawDF_train_CalcElemVolume_with_plan.mean(axis="index")
/tmp/ipykernel_207/241803984.py:4: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy /tmp/ipykernel_207/241803984.py:11: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy /tmp/ipykernel_207/241803984.py:20: FutureWarning: Dropping of nuisance columns in DataFrame reductions (with 'numeric_only=None') is deprecated; in a future version this will raise TypeError. Select only valid columns before calling the reduction.
#Call 4.285055e+06 process 1.305000e+02 iteration 4.960000e+01 size 3.680000e+01 plan 4.200366e+06 relative_error_rate 4.467501e+00 dtype: float64
fig = px.scatter_3d(
input_rawDF_train_CalcElemVolume_with_plan, x="iteration", y="size", z="plan"
)
fig.show()
/usr/local/lib/python3.10/site-packages/plotly/io/_renderers.py:395: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
T:関数コール回数 A:プロセス数 B:問題サイズ1 C:問題サイズ2 D:問題サイズ3 z以外:係数 z:切片
$ T = aB^2C + dB^2D + cC^2D + dBC^2 + cBD^2 + fCD^2 + z $
$ T = aB^3C + dB^3D + cC^3D + dBC^3 + cBD^3 + fCD^3 + z $
test_Model_LinearSumOfElementCombinationWithPower_ForMultipleRegression()
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
train_lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343]
train_lulesh_iterations: list[int] = [8, 16, 32, 64, 128]
train_lulesh_sizes: list[int] = [16, 24, 32, 48, 64]
test_lulesh_processes: list[int] = [512]
test_lulesh_iterations: list[int] = [256]
test_lulesh_sizes: list[int] = [128]
input_list_expVarNames: list[str] = ["process", "iteration", "size"]
input_list_resVarNames: list[str] = ["#Call"]
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLinearSumOf2elementCombinationWithSquared",
"modelLinearSumOf2elementCombinationWithCubed",
"modelLin"
# "modelBasicTree",
]
input_rawDF_train: pd.DataFrame = return_rawDFinLULESH(
processes=train_lulesh_processes,
iterations=train_lulesh_iterations,
sizes=train_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF_test: pd.DataFrame = return_rawDFinLULESH(
processes=test_lulesh_processes,
iterations=test_lulesh_iterations,
sizes=test_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF: pd.DataFrame = return_rawDFinLULESH(
processes=lulesh_processes,
iterations=lulesh_iterations,
sizes=lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF = input_rawDF.rename(columns={"Name": "functionName"})
input_list_expVarNames: list[str] = ["process", "iteration", "size"]
input_list_resVarNames: list[str] = ["#Call"]
mapeTableInLULESH: pd.DataFrame = returnMAPEtableInLULESH(
rawDF=input_rawDF,
list_expVar=input_list_expVarNames,
list_resVar=input_list_resVarNames,
list_modelName=list_modelName,
)
mapeTableInLULESH
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | modelLogAndIp | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | functionName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.000000e+00 | 0.000000 | 0.000000 | 1.782144e-08 | 1.642083e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | StrToInt |
| 1 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | void_CommSyncPosVel(Domain |
| 2 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupCommBuffers(Int_t) |
| 3 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::BuildMesh(Int_t_Int_t_Int_t) |
| 4 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::CreateRegionIndexSets(Int_t_Int_t) |
| 5 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_InitMeshDecomp(Int_t_Int_t_Int_t |
| 6 | 1.510565e-13 | 164.783115 | 105.457903 | 7.622791e+01 | 7.563110e+01 | 164.783115 | 105.457903 | 7.687273e-15 | 105.457903 | 3.577109e-14 | 164.783115 | 107.747783 | 2.030330e-12 | 130.670918 | 150.422522 | void_CommSBN(Domain |
| 7 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | MPI_Waitall() |
| 8 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | void_CommSend(Domain |
| 9 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupSymmetryPlanes(Int_t) |
| 10 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::Domain(Int_t_Index_t_Index_t_Inde... |
| 11 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Comm_size() |
| 12 | 3.085659e+02 | 0.000074 | 243.777234 | 1.808193e+02 | 6.014111e+01 | 308.565885 | 308.565885 | 7.382729e-05 | 0.000074 | 2.437772e+02 | 243.777234 | 346.822183 | 1.079287e-04 | 370.457865 | 388.438273 | void_VerifyAndWriteFinalOutput(Real_t_Domain |
| 13 | 1.799660e-13 | 192.995792 | 127.512160 | 7.808887e+01 | 7.752953e+01 | 192.995792 | 127.512160 | 9.971133e-15 | 127.512160 | 4.489668e-14 | 192.995792 | 128.765533 | 2.410129e-12 | 157.504072 | 181.124826 | MPI_Allreduce() |
| 14 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_ParseCommandLineOptions(int_char_**_Int_t... |
| 15 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::~Domain() |
| 16 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | MPI_Isend() |
| 17 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Barrier() |
| 18 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | void_CommRecv(Domain |
| 19 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Finalize() |
| 20 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | .TAU_application |
| 21 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Init() |
| 22 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | int_main(int_char_**) |
| 23 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Reduce() |
| 24 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupElementConnectivities(Int_t) |
| 25 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupBoundaryConditions(Int_t) |
| 26 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | MPI_Wait() |
| 27 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | MPI_Irecv() |
| 28 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | void_CalcKinematicsForElems(Domain |
| 29 | 1.197669e-13 | 170.092842 | 109.513581 | 7.630486e+01 | 7.603759e+01 | 170.092842 | 109.513581 | 1.054808e-13 | 109.513581 | 1.275162e-13 | 170.092842 | 111.668273 | 2.137670e-12 | 135.657337 | 156.132642 | MPI_Comm_rank() |
| 30 | 9.897074e+03 | 11008.061076 | 12824.894431 | 1.406233e+02 | 1.407564e+02 | 11008.061076 | 12824.894431 | 9.897074e+03 | 12824.894431 | 9.897074e+03 | 11008.061076 | 4521.029402 | 1.327401e+03 | 1210.121163 | 46.482245 | Real_t_CalcElemVolume(const |
| 31 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | void_CommMonoQ(Domain |
mapeTableInLULESHwithLowestMAPE: pd.DataFrame = addLowestMAPEColumn(
inputDF=mapeTableInLULESH, model_name_list=list_modelName, version=2
)
mapeTableInLULESHwithLowestMAPE
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | modelLogAndIp | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | functionName | 最低値 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.000000e+00 | 0.000000 | 0.000000 | 1.782144e-08 | 1.642083e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | StrToInt | 0.000000e+00 |
| 1 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | void_CommSyncPosVel(Domain | 9.075633e-15 |
| 2 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupCommBuffers(Int_t) | 0.000000e+00 |
| 3 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::BuildMesh(Int_t_Int_t_Int_t) | 0.000000e+00 |
| 4 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::CreateRegionIndexSets(Int_t_Int_t) | 0.000000e+00 |
| 5 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_InitMeshDecomp(Int_t_Int_t_Int_t | 0.000000e+00 |
| 6 | 1.510565e-13 | 164.783115 | 105.457903 | 7.622791e+01 | 7.563110e+01 | 164.783115 | 105.457903 | 7.687273e-15 | 105.457903 | 3.577109e-14 | 164.783115 | 107.747783 | 2.030330e-12 | 130.670918 | 150.422522 | void_CommSBN(Domain | 7.687273e-15 |
| 7 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | MPI_Waitall() | 7.287886e-14 |
| 8 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | void_CommSend(Domain | 7.287886e-14 |
| 9 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupSymmetryPlanes(Int_t) | 0.000000e+00 |
| 10 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::Domain(Int_t_Index_t_Index_t_Inde... | 0.000000e+00 |
| 11 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Comm_size() | 0.000000e+00 |
| 12 | 3.085659e+02 | 0.000074 | 243.777234 | 1.808193e+02 | 6.014111e+01 | 308.565885 | 308.565885 | 7.382729e-05 | 0.000074 | 2.437772e+02 | 243.777234 | 346.822183 | 1.079287e-04 | 370.457865 | 388.438273 | void_VerifyAndWriteFinalOutput(Real_t_Domain | 7.382729e-05 |
| 13 | 1.799660e-13 | 192.995792 | 127.512160 | 7.808887e+01 | 7.752953e+01 | 192.995792 | 127.512160 | 9.971133e-15 | 127.512160 | 4.489668e-14 | 192.995792 | 128.765533 | 2.410129e-12 | 157.504072 | 181.124826 | MPI_Allreduce() | 9.971133e-15 |
| 14 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_ParseCommandLineOptions(int_char_**_Int_t... | 0.000000e+00 |
| 15 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::~Domain() | 0.000000e+00 |
| 16 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | MPI_Isend() | 3.866607e+00 |
| 17 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Barrier() | 0.000000e+00 |
| 18 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | void_CommRecv(Domain | 7.287886e-14 |
| 19 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Finalize() | 0.000000e+00 |
| 20 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | .TAU_application | 0.000000e+00 |
| 21 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Init() | 0.000000e+00 |
| 22 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | int_main(int_char_**) | 0.000000e+00 |
| 23 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Reduce() | 0.000000e+00 |
| 24 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupElementConnectivities(Int_t) | 0.000000e+00 |
| 25 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | void_Domain::SetupBoundaryConditions(Int_t) | 0.000000e+00 |
| 26 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | MPI_Wait() | 3.866607e+00 |
| 27 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | MPI_Irecv() | 3.866607e+00 |
| 28 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | void_CalcKinematicsForElems(Domain | 9.075633e-15 |
| 29 | 1.197669e-13 | 170.092842 | 109.513581 | 7.630486e+01 | 7.603759e+01 | 170.092842 | 109.513581 | 1.054808e-13 | 109.513581 | 1.275162e-13 | 170.092842 | 111.668273 | 2.137670e-12 | 135.657337 | 156.132642 | MPI_Comm_rank() | 1.054808e-13 |
| 30 | 9.897074e+03 | 11008.061076 | 12824.894431 | 1.406233e+02 | 1.407564e+02 | 11008.061076 | 12824.894431 | 9.897074e+03 | 12824.894431 | 9.897074e+03 | 11008.061076 | 4521.029402 | 1.327401e+03 | 1210.121163 | 46.482245 | Real_t_CalcElemVolume(const | 4.648224e+01 |
| 31 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | void_CommMonoQ(Domain | 9.075633e-15 |
mapeTableInLULESHwithLowestMAPE.mean()
/tmp/ipykernel_207/1383311857.py:1: FutureWarning: Dropping of nuisance columns in DataFrame reductions (with 'numeric_only=None') is deprecated; in a future version this will raise TypeError. Select only valid columns before calling the reduction.
modelLin 324.173667 modelIp 411.497704 modelLog 454.526334 modelProcessDividedByProblemSize 40.081234 modelProblemSizeDividedByProcess 35.645728 modelLinAndIp 421.093841 modelLinAndLog 455.735629 modelIpAndLin 315.660772 modelIpAndLog 446.710080 modelLogAndLin 323.795580 modelLogAndIp 419.026472 modelLinearSumOf2elementCombination 194.468150 modelLinearSumOfElementCombinations 41.843775 modelLinearSumOf2elementCombinationWithSquared 102.307726 modelLinearSumOf2elementCombinationWithCubed 74.724629 最低値 1.815067 dtype: float64
なんか全体でやっても結果が怪しいので、該当関数を抜き出してやってみる
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
test_Model_LinearSumOfElementCombinationWithPowerWithoutProcess_ForMultipleRegression()
train_lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343]
train_lulesh_iterations: list[int] = [8, 16, 32, 64, 128]
train_lulesh_sizes: list[int] = [16, 24, 32, 48, 64]
test_lulesh_processes: list[int] = [512]
test_lulesh_iterations: list[int] = [256]
test_lulesh_sizes: list[int] = [128]
input_list_expVarNames: list[str] = ["process", "iteration", "size"]
input_list_resVarNames: list[str] = ["#Call"]
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLinearSumOf2elementCombinationWithSquared",
"modelLinearSumOf2elementCombinationWithSquaredWithoutProcess",
"modelLinearSumOf2elementCombinationWithCubed",
"modelLinearSumOf2elementCombinationWithCubedWithoutProcess",
"modelLin"
# "modelBasicTree",
]
input_rawDF_train: pd.DataFrame = return_rawDFinLULESH(
processes=train_lulesh_processes,
iterations=train_lulesh_iterations,
sizes=train_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF_test: pd.DataFrame = return_rawDFinLULESH(
processes=test_lulesh_processes,
iterations=test_lulesh_iterations,
sizes=test_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF: pd.DataFrame = return_rawDFinLULESH(
processes=lulesh_processes,
iterations=lulesh_iterations,
sizes=lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF = input_rawDF.rename(columns={"Name": "functionName"})
input_list_expVarNames: list[str] = ["process", "iteration", "size"]
input_list_resVarNames: list[str] = ["#Call"]
mapeTableInLULESH: pd.DataFrame = returnMAPEtableInLULESH(
rawDF=input_rawDF,
list_expVar=input_list_expVarNames,
list_resVar=input_list_resVarNames,
list_modelName=list_modelName,
)
mapeTableInLULESH
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | modelLogAndIp | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | modelLinearSumOf2elementCombinationWithCubedWithoutProcess | modelLinearSumOf2elementCombinationWithSquaredWithoutProcess | functionName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.000000e+00 | 0.000000 | 0.000000 | 1.782144e-08 | 1.642083e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | StrToInt |
| 1 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | 177.815502 | 156.787919 | void_CommSyncPosVel(Domain |
| 2 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupCommBuffers(Int_t) |
| 3 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::BuildMesh(Int_t_Int_t_Int_t) |
| 4 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::CreateRegionIndexSets(Int_t_Int_t) |
| 5 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_InitMeshDecomp(Int_t_Int_t_Int_t |
| 6 | 1.510565e-13 | 164.783115 | 105.457903 | 7.622791e+01 | 7.563110e+01 | 164.783115 | 105.457903 | 7.687273e-15 | 105.457903 | 3.577109e-14 | 164.783115 | 107.747783 | 2.030330e-12 | 130.670918 | 150.422522 | 162.970479 | 143.704393 | void_CommSBN(Domain |
| 7 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | 172.514990 | 152.115578 | MPI_Waitall() |
| 8 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | 172.514990 | 152.115578 | void_CommSend(Domain |
| 9 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupSymmetryPlanes(Int_t) |
| 10 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::Domain(Int_t_Index_t_Index_t_Inde... |
| 11 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Comm_size() |
| 12 | 3.085659e+02 | 0.000074 | 243.777234 | 1.808193e+02 | 6.014111e+01 | 308.565885 | 308.565885 | 7.382729e-05 | 0.000074 | 2.437772e+02 | 243.777234 | 346.822183 | 1.079287e-04 | 370.457865 | 388.438273 | 445.043950 | 445.043950 | void_VerifyAndWriteFinalOutput(Real_t_Domain |
| 13 | 1.799660e-13 | 192.995792 | 127.512160 | 7.808887e+01 | 7.752953e+01 | 192.995792 | 127.512160 | 9.971133e-15 | 127.512160 | 4.489668e-14 | 192.995792 | 128.765533 | 2.410129e-12 | 157.504072 | 181.124826 | 196.398317 | 173.175187 | MPI_Allreduce() |
| 14 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_ParseCommandLineOptions(int_char_**_Int_t... |
| 15 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::~Domain() |
| 16 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | 194.864998 | 172.426995 | MPI_Isend() |
| 17 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Barrier() |
| 18 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | 172.514990 | 152.115578 | void_CommRecv(Domain |
| 19 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Finalize() |
| 20 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | .TAU_application |
| 21 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Init() |
| 22 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | int_main(int_char_**) |
| 23 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Reduce() |
| 24 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupElementConnectivities(Int_t) |
| 25 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupBoundaryConditions(Int_t) |
| 26 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | 194.864998 | 172.426995 | MPI_Wait() |
| 27 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | 194.864998 | 172.426995 | MPI_Irecv() |
| 28 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | 177.815502 | 156.787919 | void_CalcKinematicsForElems(Domain |
| 29 | 1.197669e-13 | 170.092842 | 109.513581 | 7.630486e+01 | 7.603759e+01 | 170.092842 | 109.513581 | 1.054808e-13 | 109.513581 | 1.275162e-13 | 170.092842 | 111.668273 | 2.137670e-12 | 135.657337 | 156.132642 | 169.186585 | 149.182071 | MPI_Comm_rank() |
| 30 | 9.897074e+03 | 11008.061076 | 12824.894431 | 1.406233e+02 | 1.407564e+02 | 11008.061076 | 12824.894431 | 9.897074e+03 | 12824.894431 | 9.897074e+03 | 11008.061076 | 4521.029402 | 1.327401e+03 | 1210.121163 | 46.482245 | 64.420842 | 1278.916987 | Real_t_CalcElemVolume(const |
| 31 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | 177.815502 | 156.787919 | void_CommMonoQ(Domain |
mapeTableInLULESHwithLowestMAPE: pd.DataFrame = addLowestMAPEColumn(
inputDF=mapeTableInLULESH, model_name_list=list_modelName, version=2
)
mapeTableInLULESHwithLowestMAPE
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | modelLogAndIp | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | modelLinearSumOf2elementCombinationWithCubedWithoutProcess | modelLinearSumOf2elementCombinationWithSquaredWithoutProcess | functionName | 最低値 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.000000e+00 | 0.000000 | 0.000000 | 1.782144e-08 | 1.642083e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | StrToInt | 0.000000e+00 |
| 1 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | 177.815502 | 156.787919 | void_CommSyncPosVel(Domain | 9.075633e-15 |
| 2 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupCommBuffers(Int_t) | 0.000000e+00 |
| 3 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::BuildMesh(Int_t_Int_t_Int_t) | 0.000000e+00 |
| 4 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::CreateRegionIndexSets(Int_t_Int_t) | 0.000000e+00 |
| 5 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_InitMeshDecomp(Int_t_Int_t_Int_t | 0.000000e+00 |
| 6 | 1.510565e-13 | 164.783115 | 105.457903 | 7.622791e+01 | 7.563110e+01 | 164.783115 | 105.457903 | 7.687273e-15 | 105.457903 | 3.577109e-14 | 164.783115 | 107.747783 | 2.030330e-12 | 130.670918 | 150.422522 | 162.970479 | 143.704393 | void_CommSBN(Domain | 7.687273e-15 |
| 7 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | 172.514990 | 152.115578 | MPI_Waitall() | 7.287886e-14 |
| 8 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | 172.514990 | 152.115578 | void_CommSend(Domain | 7.287886e-14 |
| 9 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupSymmetryPlanes(Int_t) | 0.000000e+00 |
| 10 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::Domain(Int_t_Index_t_Index_t_Inde... | 0.000000e+00 |
| 11 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Comm_size() | 0.000000e+00 |
| 12 | 3.085659e+02 | 0.000074 | 243.777234 | 1.808193e+02 | 6.014111e+01 | 308.565885 | 308.565885 | 7.382729e-05 | 0.000074 | 2.437772e+02 | 243.777234 | 346.822183 | 1.079287e-04 | 370.457865 | 388.438273 | 445.043950 | 445.043950 | void_VerifyAndWriteFinalOutput(Real_t_Domain | 7.382729e-05 |
| 13 | 1.799660e-13 | 192.995792 | 127.512160 | 7.808887e+01 | 7.752953e+01 | 192.995792 | 127.512160 | 9.971133e-15 | 127.512160 | 4.489668e-14 | 192.995792 | 128.765533 | 2.410129e-12 | 157.504072 | 181.124826 | 196.398317 | 173.175187 | MPI_Allreduce() | 9.971133e-15 |
| 14 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_ParseCommandLineOptions(int_char_**_Int_t... | 0.000000e+00 |
| 15 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::~Domain() | 0.000000e+00 |
| 16 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | 194.864998 | 172.426995 | MPI_Isend() | 3.866607e+00 |
| 17 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Barrier() | 0.000000e+00 |
| 18 | 1.500754e-13 | 172.922882 | 111.693928 | 8.499044e+01 | 7.624396e+01 | 172.922882 | 111.693928 | 7.287886e-14 | 111.693928 | 1.520599e-13 | 172.922882 | 113.765030 | 1.625247e-12 | 138.327962 | 159.189936 | 172.514990 | 152.115578 | void_CommRecv(Domain | 7.287886e-14 |
| 19 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Finalize() | 0.000000e+00 |
| 20 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | .TAU_application | 0.000000e+00 |
| 21 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Init() | 0.000000e+00 |
| 22 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | int_main(int_char_**) | 0.000000e+00 |
| 23 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Reduce() | 0.000000e+00 |
| 24 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupElementConnectivities(Int_t) | 0.000000e+00 |
| 25 | 0.000000e+00 | 0.000000 | 0.000000 | 2.308030e-08 | 1.862710e-08 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | void_Domain::SetupBoundaryConditions(Int_t) | 0.000000e+00 |
| 26 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | 194.864998 | 172.426995 | MPI_Wait() | 3.866607e+00 |
| 27 | 5.597246e+01 | 193.662948 | 151.023292 | 8.183808e+01 | 8.405442e+01 | 193.166473 | 142.326222 | 6.802352e+01 | 148.908970 | 7.353575e+01 | 192.710753 | 104.783416 | 3.866607e+00 | 142.235445 | 166.280809 | 194.864998 | 172.426995 | MPI_Irecv() | 3.866607e+00 |
| 28 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | 177.815502 | 156.787919 | void_CalcKinematicsForElems(Domain | 9.075633e-15 |
| 29 | 1.197669e-13 | 170.092842 | 109.513581 | 7.630486e+01 | 7.603759e+01 | 170.092842 | 109.513581 | 1.054808e-13 | 109.513581 | 1.275162e-13 | 170.092842 | 111.668273 | 2.137670e-12 | 135.657337 | 156.132642 | 169.186585 | 149.182071 | MPI_Comm_rank() | 1.054808e-13 |
| 30 | 9.897074e+03 | 11008.061076 | 12824.894431 | 1.406233e+02 | 1.407564e+02 | 11008.061076 | 12824.894431 | 9.897074e+03 | 12824.894431 | 9.897074e+03 | 11008.061076 | 4521.029402 | 1.327401e+03 | 1210.121163 | 46.482245 | 64.420842 | 1278.916987 | Real_t_CalcElemVolume(const | 4.648224e+01 |
| 31 | 1.646390e-13 | 177.412047 | 115.178571 | 7.668323e+01 | 7.655747e+01 | 177.412047 | 115.178571 | 9.075633e-15 | 115.178571 | 4.070818e-14 | 177.412047 | 117.100765 | 2.199475e-12 | 142.581880 | 164.058464 | 177.815502 | 156.787919 | void_CommMonoQ(Domain | 9.075633e-15 |
mapeTableInLULESHwithLowestMAPE.mean()
/tmp/ipykernel_207/1383311857.py:1: FutureWarning: Dropping of nuisance columns in DataFrame reductions (with 'numeric_only=None') is deprecated; in a future version this will raise TypeError. Select only valid columns before calling the reduction.
modelLin 324.173667 modelIp 411.497704 modelLog 454.526334 modelProcessDividedByProblemSize 40.081234 modelProblemSizeDividedByProcess 35.645728 modelLinAndIp 421.093841 modelLinAndLog 455.735629 modelIpAndLin 315.660772 modelIpAndLog 446.710080 modelLogAndLin 323.795580 modelLogAndIp 419.026472 modelLinearSumOf2elementCombination 194.468150 modelLinearSumOfElementCombinations 41.843775 modelLinearSumOf2elementCombinationWithSquared 102.307726 modelLinearSumOf2elementCombinationWithCubed 74.724629 modelLinearSumOf2elementCombinationWithCubedWithoutProcess 83.550208 modelLinearSumOf2elementCombinationWithSquaredWithoutProcess 113.562940 最低値 1.815067 dtype: float64
# LULESH の重み付きMAPEを計算(2022年6月28日)
list_modelName_new: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLinearSumOf2elementCombinationWithSquared",
"modelLinearSumOf2elementCombinationWithSquaredWithoutProcess",
"modelLinearSumOf2elementCombinationWithCubed",
"modelLinearSumOf2elementCombinationWithCubedWithoutProcess",
"modelLin"
# "modelBasicTree",
]
list_modelName_old: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
# "modelLinearSumOf2elementCombinationWithSquared",
# "modelLinearSumOf2elementCombinationWithSquaredWithoutProcess",
# "modelLinearSumOf2elementCombinationWithCubed",
# "modelLinearSumOf2elementCombinationWithCubedWithoutProcess",
"modelLin"
# "modelBasicTree",
]
train_lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343]
train_lulesh_iterations: list[int] = [8, 16, 32, 64, 128]
train_lulesh_sizes: list[int] = [16, 24, 32, 48, 64]
test_lulesh_processes: list[int] = [512]
test_lulesh_iterations: list[int] = [256]
test_lulesh_sizes: list[int] = [128]
weightedMAPEatLULESH_old: float = returnWeightedMapeScoreFromCondition(
benchmarkName="lulesh",
trainCondition={
"processes": train_lulesh_processes,
"iterations": train_lulesh_iterations,
"sizes": train_lulesh_sizes,
},
testCondition={
"processes": test_lulesh_processes,
"iterations": test_lulesh_iterations,
"sizes": test_lulesh_sizes,
},
list_modelName=list_modelName_old,
csvDirPath=csvDirPath,
)
weightedMAPEatLULESH_new: float = returnWeightedMapeScoreFromCondition(
benchmarkName="lulesh",
trainCondition={
"processes": train_lulesh_processes,
"iterations": train_lulesh_iterations,
"sizes": train_lulesh_sizes,
},
testCondition={
"processes": test_lulesh_processes,
"iterations": test_lulesh_iterations,
"sizes": test_lulesh_sizes,
},
list_modelName=list_modelName_new,
csvDirPath=csvDirPath,
)
print(f"new = {weightedMAPEatLULESH_new}\nold = {weightedMAPEatLULESH_old}")
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
new = 0.6007736506875964 old = 99.34434422023138
# 新規追加した4モデルをのぞいた平均MAPEを取得する
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
# "modelLinearSumOf2elementCombinationWithSquared",
# "modelLinearSumOf2elementCombinationWithCubed",
"modelLin"
# "modelBasicTree",
]
input_rawDF_train: pd.DataFrame = return_rawDFinLULESH(
processes=train_lulesh_processes,
iterations=train_lulesh_iterations,
sizes=train_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF_test: pd.DataFrame = return_rawDFinLULESH(
processes=test_lulesh_processes,
iterations=test_lulesh_iterations,
sizes=test_lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF: pd.DataFrame = return_rawDFinLULESH(
processes=lulesh_processes,
iterations=lulesh_iterations,
sizes=lulesh_sizes,
csvDirPath=csvDirPath,
)
input_rawDF = input_rawDF.rename(columns={"Name": "functionName"})
input_list_expVarNames: list[str] = ["process", "iteration", "size"]
input_list_resVarNames: list[str] = ["#Call"]
mapeTableInLULESH: pd.DataFrame = returnMAPEtableInLULESH(
rawDF=input_rawDF,
list_expVar=input_list_expVarNames,
list_resVar=input_list_resVarNames,
list_modelName=list_modelName,
)
mapeTableInLULESHwithLowestMAPE: pd.DataFrame = addLowestMAPEColumn(
inputDF=mapeTableInLULESH, model_name_list=list_modelName, version=2
)
mapeTableInLULESHwithLowestMAPE.mean()
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /tmp/ipykernel_207/2699728334.py:57: FutureWarning: Dropping of nuisance columns in DataFrame reductions (with 'numeric_only=None') is deprecated; in a future version this will raise TypeError. Select only valid columns before calling the reduction.
modelLin 324.173667 modelIp 411.497704 modelLog 454.526334 modelProcessDividedByProblemSize 40.081234 modelProblemSizeDividedByProcess 35.645728 modelLinAndIp 421.093841 modelLinAndLog 455.735629 modelIpAndLin 315.660772 modelIpAndLog 446.710080 modelLogAndLin 323.795580 modelLogAndIp 419.026472 modelLinearSumOf2elementCombination 194.468150 modelLinearSumOfElementCombinations 41.843775 最低値 4.756974 dtype: float64
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
コストを算出するプログラムの作成
train_lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343]
train_lulesh_iterations: list[int] = [8, 16, 32, 64, 128]
train_lulesh_sizes: list[int] = [16, 24, 32, 48, 64]
test_lulesh_processes: list[int] = [512]
test_lulesh_iterations: list[int] = [256]
test_lulesh_sizes: list[int] = [128]
conditionDict_toBuild: dict[str, list[int]] = {
"processes": train_lulesh_processes,
"iterations": train_lulesh_iterations,
"sizes": train_lulesh_sizes,
}
conditionDict_InReal: dict[str, list[int]] = {
"processes": test_lulesh_processes,
"iterations": test_lulesh_iterations,
"sizes": test_lulesh_sizes,
}
csvFilePath: str = csvDirPath + "ExecTime@LULESH.csv"
execTimeAtLulesh: pd.DataFrame = pd.read_csv(csvFilePath)
print(f"_toBuild")
computationTime_toBuild: float = 0
for index, row in execTimeAtLulesh.dropna().iterrows():
if row["プロセス数"] not in conditionDict_toBuild["processes"]:
continue
if row["問題サイズ"] not in conditionDict_toBuild["sizes"]:
continue
if row["イテレーション数"] not in conditionDict_toBuild["iterations"]:
continue
computationTime_toBuild += row["実行時間(s)"] * row["プロセス数"]
print(f"_InReal")
computationTime_InReal: float = 0
for index, row in execTimeAtLulesh.dropna().iterrows():
if row["プロセス数"] not in conditionDict_InReal["processes"]:
continue
if row["問題サイズ"] not in conditionDict_InReal["sizes"]:
continue
if row["イテレーション数"] not in conditionDict_InReal["iterations"]:
continue
computationTime_InReal += row["実行時間(s)"] * row["プロセス数"]
print(
f"computationTime_toBuild={computationTime_toBuild}, computationTime_InReal={computationTime_InReal}"
)
print(f"相対コスト(%) = {computationTime_toBuild/computationTime_InReal * 100}")
_toBuild _InReal computationTime_toBuild=181695.41600000003, computationTime_InReal=614400.0 相対コスト(%) = 29.57282161458334
# NPB
benchmarkName = "cg"
train_NPB_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_NPB_classes: list[str] = ["A", "B", "C"]
test_NPB_processes: list[int] = [256]
test_NPB_classes: list[str] = ["D"]
conditionDict_toBuild: dict[str, list[int] | list[str]] = {
"processes": train_NPB_processes,
"classes": train_NPB_classes,
}
conditionDict_InReal: dict[str, list[int] | list[str]] = {
"processes": test_NPB_processes,
"classes": test_NPB_classes,
}
csvFilePath: str = csvDirPath + "ExecTime@" + benchmarkName + ".csv"
execTimeAtBenchmark: pd.DataFrame = pd.read_csv(csvFilePath)
execTimeAtBenchmark = execTimeAtBenchmark.set_index("Unnamed: 0")
print(execTimeAtBenchmark.index.is_unique)
print(execTimeAtBenchmark.columns.is_unique)
print(execTimeAtBenchmark.index)
print(execTimeAtBenchmark.columns)
print(f"_toBuild")
computationTime_toBuild: float = 0
for train_class in train_NPB_classes:
for train_process in train_NPB_processes:
execNum = execTimeAtBenchmark.at[str(train_class), str(train_process)]
if math.isnan(execNum) == False:
print(
f"train_class={train_class},train_process={train_process},execNum={execNum}"
)
computationTime_toBuild += float(train_process) * float(execNum)
print(f"_inReal")
computationTime_InReal: float = 0
for test_class in test_NPB_classes:
for test_process in test_NPB_processes:
execNum = execTimeAtBenchmark.at[str(test_class), str(test_process)]
if math.isnan(execNum) == False:
print(
f"test_class={test_class},test_process={test_process},execNum={execNum}"
)
computationTime_InReal += float(test_process) * float(execNum)
print(f"index = {execTimeAtBenchmark.index}\ncolumn = {execTimeAtBenchmark.columns}")
execTimeAtBenchmark
print(
f"computationTime_toBuild={computationTime_toBuild}, computationTime_InReal={computationTime_InReal}"
)
print(f"相対コスト(%) = {computationTime_toBuild/computationTime_InReal * 100}")
True
True
Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
_toBuild
train_class=A,train_process=2,execNum=0.43
train_class=A,train_process=4,execNum=0.22
train_class=A,train_process=8,execNum=0.11
train_class=A,train_process=16,execNum=0.08
train_class=A,train_process=32,execNum=0.07
train_class=A,train_process=64,execNum=0.05
train_class=A,train_process=128,execNum=0.05
train_class=B,train_process=2,execNum=47.78
train_class=B,train_process=4,execNum=25.64
train_class=B,train_process=8,execNum=7.38
train_class=B,train_process=16,execNum=4.08
train_class=B,train_process=32,execNum=3.13
train_class=B,train_process=64,execNum=1.5
train_class=B,train_process=128,execNum=0.89
train_class=C,train_process=2,execNum=155.79
train_class=C,train_process=4,execNum=82.68
train_class=C,train_process=8,execNum=35.51
train_class=C,train_process=16,execNum=18.47
train_class=C,train_process=32,execNum=8.95
train_class=C,train_process=64,execNum=6.48
train_class=C,train_process=128,execNum=2.71
_inReal
test_class=D,test_process=256,execNum=61.66
index = Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
column = Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
computationTime_toBuild=2918.16, computationTime_InReal=15784.96
相対コスト(%) = 18.486964807006164
benchmarkName = "ep"
csvFilePath: str = csvDirPath + "ExecTime@" + benchmarkName + ".csv"
execTimeAtBenchmark: pd.DataFrame = pd.read_csv(csvFilePath)
execTimeAtBenchmark = execTimeAtBenchmark.set_index("Unnamed: 0")
print(execTimeAtBenchmark.index.is_unique)
print(execTimeAtBenchmark.columns.is_unique)
print(execTimeAtBenchmark.index)
print(execTimeAtBenchmark.columns)
print(f"_toBuild")
computationTime_toBuild: float = 0
for train_class in train_NPB_classes:
for train_process in train_NPB_processes:
execNum = execTimeAtBenchmark.at[str(train_class), str(train_process)]
if math.isnan(execNum) == False:
print(
f"train_class={train_class},train_process={train_process},execNum={execNum}"
)
computationTime_toBuild += float(train_process) * float(execNum)
print(f"_inReal")
computationTime_InReal: float = 0
for test_class in test_NPB_classes:
for test_process in test_NPB_processes:
execNum = execTimeAtBenchmark.at[str(test_class), str(test_process)]
if math.isnan(execNum) == False:
print(
f"test_class={test_class},test_process={test_process},execNum={execNum}"
)
computationTime_InReal += float(test_process) * float(execNum)
print(f"index = {execTimeAtBenchmark.index}\ncolumn = {execTimeAtBenchmark.columns}")
execTimeAtBenchmark
print(
f"computationTime_toBuild={computationTime_toBuild}, computationTime_InReal={computationTime_InReal}"
)
print(f"相対コスト(%) = {computationTime_toBuild/computationTime_InReal * 100}")
True
True
Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
_toBuild
train_class=A,train_process=2,execNum=6.48
train_class=A,train_process=4,execNum=3.27
train_class=A,train_process=8,execNum=1.62
train_class=A,train_process=16,execNum=0.81
train_class=A,train_process=32,execNum=0.44
train_class=A,train_process=64,execNum=0.42
train_class=A,train_process=128,execNum=0.13
train_class=B,train_process=2,execNum=25.92
train_class=B,train_process=4,execNum=13.17
train_class=B,train_process=8,execNum=6.51
train_class=B,train_process=16,execNum=3.26
train_class=B,train_process=32,execNum=1.7
train_class=B,train_process=64,execNum=0.85
train_class=B,train_process=128,execNum=0.46
train_class=C,train_process=2,execNum=103.67
train_class=C,train_process=4,execNum=51.91
train_class=C,train_process=8,execNum=26.05
train_class=C,train_process=16,execNum=13.01
train_class=C,train_process=32,execNum=6.54
train_class=C,train_process=64,execNum=6.66
train_class=C,train_process=128,execNum=1.68
_inReal
test_class=D,test_process=256,execNum=13.38
index = Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
column = Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
computationTime_toBuild=2168.1000000000004, computationTime_InReal=3425.28
相対コスト(%) = 63.297015134529154
benchmarkName = "is"
csvFilePath: str = csvDirPath + "ExecTime@" + benchmarkName + ".csv"
execTimeAtBenchmark: pd.DataFrame = pd.read_csv(csvFilePath)
execTimeAtBenchmark = execTimeAtBenchmark.set_index("Unnamed: 0")
print(execTimeAtBenchmark.index.is_unique)
print(execTimeAtBenchmark.columns.is_unique)
print(execTimeAtBenchmark.index)
print(execTimeAtBenchmark.columns)
print(f"_toBuild")
computationTime_toBuild: float = 0
for train_class in train_NPB_classes:
for train_process in train_NPB_processes:
execNum = execTimeAtBenchmark.at[str(train_class), str(train_process)]
if math.isnan(execNum) == False:
print(
f"train_class={train_class},train_process={train_process},execNum={execNum}"
)
computationTime_toBuild += float(train_process) * float(execNum)
print(f"_inReal")
computationTime_InReal: float = 0
for test_class in test_NPB_classes:
for test_process in test_NPB_processes:
execNum = execTimeAtBenchmark.at[str(test_class), str(test_process)]
if math.isnan(execNum) == False:
print(
f"test_class={test_class},test_process={test_process},execNum={execNum}"
)
computationTime_InReal += float(test_process) * float(execNum)
print(f"index = {execTimeAtBenchmark.index}\ncolumn = {execTimeAtBenchmark.columns}")
execTimeAtBenchmark
print(
f"computationTime_toBuild={computationTime_toBuild}, computationTime_InReal={computationTime_InReal}"
)
print(f"相対コスト(%) = {computationTime_toBuild/computationTime_InReal * 100}")
True
True
Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
_toBuild
train_class=A,train_process=2,execNum=0.51
train_class=A,train_process=4,execNum=0.26
train_class=A,train_process=8,execNum=0.13
train_class=A,train_process=16,execNum=0.07
train_class=A,train_process=32,execNum=0.04
train_class=A,train_process=64,execNum=0.03
train_class=A,train_process=128,execNum=0.02
train_class=B,train_process=2,execNum=2.03
train_class=B,train_process=4,execNum=1.06
train_class=B,train_process=8,execNum=0.55
train_class=B,train_process=16,execNum=0.3
train_class=B,train_process=32,execNum=0.17
train_class=B,train_process=64,execNum=0.12
train_class=B,train_process=128,execNum=0.07
train_class=C,train_process=2,execNum=8.09
train_class=C,train_process=4,execNum=4.24
train_class=C,train_process=8,execNum=2.3
train_class=C,train_process=16,execNum=1.25
train_class=C,train_process=32,execNum=0.73
train_class=C,train_process=64,execNum=0.43
train_class=C,train_process=128,execNum=0.27
_inReal
test_class=D,test_process=256,execNum=2.62
index = Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
column = Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
computationTime_toBuild=206.54000000000005, computationTime_InReal=670.72
相対コスト(%) = 30.793773854961838
benchmarkName = "mg"
csvFilePath: str = csvDirPath + "ExecTime@" + benchmarkName + ".csv"
execTimeAtBenchmark: pd.DataFrame = pd.read_csv(csvFilePath)
execTimeAtBenchmark = execTimeAtBenchmark.set_index("Unnamed: 0")
print(execTimeAtBenchmark.index.is_unique)
print(execTimeAtBenchmark.columns.is_unique)
print(execTimeAtBenchmark.index)
print(execTimeAtBenchmark.columns)
print(f"_toBuild")
computationTime_toBuild: float = 0
for train_class in train_NPB_classes:
for train_process in train_NPB_processes:
execNum = execTimeAtBenchmark.at[str(train_class), str(train_process)]
if math.isnan(execNum) == False:
print(
f"train_class={train_class},train_process={train_process},execNum={execNum}"
)
computationTime_toBuild += float(train_process) * float(execNum)
print(f"_inReal")
computationTime_InReal: float = 0
for test_class in test_NPB_classes:
for test_process in test_NPB_processes:
execNum = execTimeAtBenchmark.at[str(test_class), str(test_process)]
if math.isnan(execNum) == False:
print(
f"test_class={test_class},test_process={test_process},execNum={execNum}"
)
computationTime_InReal += float(test_process) * float(execNum)
print(f"index = {execTimeAtBenchmark.index}\ncolumn = {execTimeAtBenchmark.columns}")
execTimeAtBenchmark
print(
f"computationTime_toBuild={computationTime_toBuild}, computationTime_InReal={computationTime_InReal}"
)
print(f"相対コスト(%) = {computationTime_toBuild/computationTime_InReal * 100}")
True
True
Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
_toBuild
train_class=A,train_process=2,execNum=0.55
train_class=A,train_process=4,execNum=0.32
train_class=A,train_process=8,execNum=0.2
train_class=A,train_process=16,execNum=0.11
train_class=A,train_process=32,execNum=0.1
train_class=A,train_process=64,execNum=0.06
train_class=A,train_process=128,execNum=0.03
train_class=B,train_process=2,execNum=2.58
train_class=B,train_process=4,execNum=1.48
train_class=B,train_process=8,execNum=0.93
train_class=B,train_process=16,execNum=0.5
train_class=B,train_process=32,execNum=0.46
train_class=B,train_process=64,execNum=0.26
train_class=B,train_process=128,execNum=0.14
train_class=C,train_process=2,execNum=23.2
train_class=C,train_process=4,execNum=13.64
train_class=C,train_process=8,execNum=7.59
train_class=C,train_process=16,execNum=3.93
train_class=C,train_process=32,execNum=3.48
train_class=C,train_process=64,execNum=1.69
train_class=C,train_process=128,execNum=0.9
_inReal
test_class=D,test_process=256,execNum=10.47
index = Index(['S', 'W', 'A', 'B', 'C', 'D'], dtype='object', name='Unnamed: 0')
column = Index(['1', '2', '4', '8', '9', '16', '25', '32', '36', '49', '64', '81',
'100', '121', '128', '144', '169', '196', '225', '256'],
dtype='object')
computationTime_toBuild=651.7, computationTime_InReal=2680.32
相対コスト(%) = 24.314260983763134
出力例(妄想)
PARAMETER a
PARAMETER b
PARAMETER c
POINTS ( a_1 b_1 c_1 ) ( a_2 b_2 c_2 ) ( a_3 b_3 c_3 )
...
POINTS ( a_n1 b_n1 c_n1 ) ( a_n2 b_n2 c_n2 ) ( a_n3 b_n3 c_n3 )
REGION reg
METRIC time
DATA ( a_1 b_1 c_1 )_1 ( a_1 b_1 c_1 )_2 ( a_1 b_1 c_1 )_3
DATA ( a_2 b_2 c_2 )_1 ( a_2 b_2 c_2 )_2 ( a_2 b_2 c_2 )_3
DATA ( a_3 b_3 c_3 )_1 ( a_3 b_3 c_3 )_2 ( a_3 b_3 c_3 )_3
...
DATA ( a_n1 b_n1 c_n1 )_1 ( a_n1 b_n1 c_n1 )_2 ( a_n1 b_n1 c_n1 )_3
DATA ( a_n2 b_n2 c_n2 )_1 ( a_n2 b_n2 c_n2 )_2 ( a_n2 b_n2 c_n2 )_3
DATA ( a_n3 b_n3 c_n3 )_1 ( a_n3 b_n3 c_n3 )_2 ( a_n3 b_n3 c_n3 )_3
csvFilePath: str = csvDirPath + "ExecTime@LULESH.csv"
execTimeAtLulesh: pd.DataFrame = pd.read_csv(csvFilePath)
execTimeAtLulesh
| プロセス数 | 問題サイズ | イテレーション数 | 実行時間(s) | プロファイル収集済 | |
|---|---|---|---|---|---|
| 0 | 1 | 16 | 8 | NaN | NaN |
| 1 | 1 | 16 | 16 | NaN | NaN |
| 2 | 1 | 16 | 32 | NaN | NaN |
| 3 | 1 | 16 | 64 | NaN | NaN |
| 4 | 1 | 16 | 128 | NaN | NaN |
| ... | ... | ... | ... | ... | ... |
| 319 | 512 | 24 | 16 | 0.58 | 1.0 |
| 320 | 512 | 24 | 32 | 1.20 | 1.0 |
| 321 | 512 | 24 | 64 | 2.30 | 1.0 |
| 322 | 512 | 24 | 128 | 4.60 | 1.0 |
| 323 | 512 | 24 | 256 | 9.30 | 1.0 |
324 rows × 5 columns
作成された入力データから下記のコマンドでモデルを算出した
extrap --text ./extra-p_docker/share/input.txt
$ T = -1.2943410415130208 + 0.2533461049298612 * z^{1} + 2.150869701234015e^{-07} * y^{3} * log_2 (y)^{1} * z^{1} $
x = 512
y = 24
z = 256
execTime_p512s24i256 = (
-1.2943410415130208
+ 0.2533461049298612 * z
+ 2.150869701234015 * 10**-7 * y**3 * math.log2(y) * z
)
execTime_p512s24i256
67.05224698068999
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLinearSumOf2elementCombinationWithSquared",
"modelLinearSumOf2elementCombinationWithCubed",
"modelLin"
# "modelBasicTree",
]
# NPB_CG
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["D"]
weightedMAPEatCG: float = returnWeightedMapeScoreFromCondition(
benchmarkName="cg",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatCG
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
174.81351700577324
# NPB_EP
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["D"]
weightedMAPEatEP: float = returnWeightedMapeScoreFromCondition(
benchmarkName="ep",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatEP
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
0.0
# NPB_IS
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["D"]
weightedMAPEatIS: float = returnWeightedMapeScoreFromCondition(
benchmarkName="is",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatIS
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
0.14096468916816277
# NPB_MG
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["D"]
weightedMAPEatMG: float = returnWeightedMapeScoreFromCondition(
benchmarkName="mg",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatMG
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
7024.080516840863
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
新規に取得したベンチマークプログラムCGおよびMGの生データを取得する関数
input_list_process: list[int] = [2, 4]
input_list_na: list[int] = [14000, 75000]
input_list_nonzer: list[int] = [11, 21]
input_list_niter: list[int] = [90, 100]
input_list_shift: list[int] = [60, 80]
DF_raw_cg = return_rawDF_cg(
list_process=input_list_process,
list_na=input_list_na,
list_nonzer=input_list_nonzer,
list_niter=input_list_niter,
list_shift=input_list_shift,
csvDir=csvDirPath,
)
print(DF_raw_cg)
%Time Exclusive Inclusive #Call #Subrs Name process \
0 100.0 0.006 9,044 1.0 1.0 .TAU_application 2
1 100.0 2 9,044 1.0 385.5 CG 2
2 66.0 5,971 5,971 1.0 0.0 MPI_Finalize() 2
3 28.6 2,498 2,583 91.0 28392.0 CONJ_GRAD 2
4 3.5 0.032 317 1.0 3.5 INITIALIZE_MPI 2
.. ... ... ... ... ... ... ...
25 0.0 0.0005 0.0005 1.0 0.0 TIMER_STOP 4
26 0.0 0.00025 0.00025 1.0 0.0 MPI_Comm_size() 4
27 0.0 0 0 1.0 0.0 MPI_Comm_rank() 4
28 0.0 0 0 1.0 0.0 SETUP_PROC_INFO 4
29 0.0 0 0 1.0 0.0 TIMER_READ 4
na nonzer niter shift
0 14000 11 90 60
1 14000 11 90 60
2 14000 11 90 60
3 14000 11 90 60
4 14000 11 90 60
.. ... ... ... ...
25 75000 21 100 80
26 75000 21 100 80
27 75000 21 100 80
28 75000 21 100 80
29 75000 21 100 80
[960 rows x 11 columns]
input_list_process: list[int] = [2, 4]
input_list_problem_size: list[int] = [32, 64]
input_list_nit: list[int] = [4, 50]
DF_raw_mg = return_rawDF_mg(
list_process=input_list_process,
list_problem_size=input_list_problem_size,
list_nit=input_list_nit,
csvDir=csvDirPath,
)
print(DF_raw_mg)
%Time Exclusive Inclusive #Call #Subrs Name process \
0 100.0 0.0155 11,343 1.00 1.0 .TAU_application 2
1 100.0 0.3 11,343 1.00 59.5 MG_MPI 2
2 95.8 10,868 10,868 1.00 0.0 MPI_Finalize() 2
3 4.1 469 469 1.00 0.0 MPI_Init() 2
4 0.0 0.0405 2 5.00 105.0 MG3P 2
.. ... ... ... ... ... ... ...
34 0.0 0.0025 0.0025 17.00 0.0 TIMER_CLEAR 4
35 0.0 0.00175 0.00175 2.00 0.0 TIMER_STOP 4
36 0.0 0.00025 0.00025 1.00 0.0 MPI_Comm_size() 4
37 0.0 0.00025 0.00025 1.25 0.0 TIMER_READ 4
38 0.0 0 0 1.00 0.0 MPI_Comm_rank() 4
problem_size nit
0 32 4
1 32 4
2 32 4
3 32 4
4 32 4
.. ... ...
34 64 50
35 64 50
36 64 50
37 64 50
38 64 50
[312 rows x 9 columns]
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
date: str = "2022年7月26日"
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLinearSumOf2elementCombinationWithSquared",
"modelLinearSumOf2elementCombinationWithCubed",
"modelLin"
# "modelBasicTree",
]
input_list_process: list[int] = [2, 4, 8, 16, 32, 64, 128]
target_list_process: list[int] = [256]
cg_input_list_na: list[int] = [14000, 30000, 75000, 100000]
cg_input_list_nonzer: list[int] = [11, 12, 13, 14, 15, 18]
cg_input_list_niter: list[int] = [15, 30, 75, 90]
cg_input_list_shift: list[int] = [20, 40, 60, 80, 110]
cg_target_list_na: list[int] = [1500000]
cg_target_list_nonzer: list[int] = [21]
cg_target_list_niter: list[int] = [100]
cg_target_list_shift: list[int] = [200]
mg_input_list_problem_size: list[int] = [32, 64, 128, 256]
mg_input_list_nit: list[int] = [4, 10, 20, 35]
mg_target_list_problem_size: list[int] = [512]
mg_target_list_nit: list[int] = [50]
input_rawDF_cg: pd.DataFrame = return_rawDF_cg(
list_process=input_list_process,
list_na=cg_input_list_na,
list_nonzer=cg_input_list_nonzer,
list_niter=cg_input_list_niter,
list_shift=cg_input_list_shift,
csvDir=csvDirPath,
)
target_rawDF_cg: pd.DataFrame = return_rawDF_cg(
list_process=target_list_process,
list_na=cg_target_list_na,
list_nonzer=cg_target_list_nonzer,
list_niter=cg_target_list_niter,
list_shift=cg_target_list_shift,
csvDir=csvDirPath,
)
print(f"input_rawDF_cg =\n{input_rawDF_cg}\target_rawDF_cg=\n{target_rawDF_cg}")
input_rawDF_mg: pd.DataFrame = return_rawDF_mg(
list_process=input_list_process,
list_problem_size=mg_input_list_problem_size,
list_nit=mg_input_list_nit,
csvDir=csvDirPath,
)
target_rawDF_mg: pd.DataFrame = return_rawDF_mg(
list_process=target_list_process,
list_problem_size=mg_target_list_problem_size,
list_nit=mg_target_list_nit,
csvDir=csvDirPath,
)
print(f"input_rawDF_mg =\n{input_rawDF_mg}\target_rawDF_mg=\n{target_rawDF_mg}")
/tmp/ipykernel_207/3490495865.py:46: UserWarning: ./csv_files/cg_na75000_nonzer18_niter30_shift60_process4.csv is empty. /tmp/ipykernel_207/3490495865.py:46: UserWarning: ./csv_files/cg_na75000_nonzer15_niter90_shift80_process8.csv is empty.
input_rawDF_cg =
%Time Exclusive Inclusive #Call #Subrs Name process \
0 100.0 0.0065 7,550 1.0 1.0 .TAU_application 2
1 100.0 1 7,550 1.0 85.5 CG 2
2 83.8 6,327 6,327 1.0 0.0 MPI_Finalize() 2
3 8.0 0.0345 603 1.0 3.5 INITIALIZE_MPI 2
4 8.0 603 603 1.0 0.0 MPI_Init() 2
.. ... ... ... ... ... ... ...
25 0.0 0.000484 0.000484 1.0 0.0 SETUP_SUBMATRIX_INFO 128
26 0.0 0.000266 0.000266 1.0 0.0 MPI_Comm_size() 128
27 0.0 0.000203 0.000203 1.0 0.0 MPI_Comm_rank() 128
28 0.0 0.000195 0.000195 1.0 0.0 SETUP_PROC_INFO 128
29 0.0 7.81E-05 7.81E-05 1.0 0.0 TIMER_READ 128
na nonzer niter shift
0 14000 11 15 20
1 14000 11 15 20
2 14000 11 15 20
3 14000 11 15 20
4 14000 11 15 20
.. ... ... ... ...
25 100000 18 90 110
26 100000 18 90 110
27 100000 18 90 110
28 100000 18 90 110
29 100000 18 90 110
[100740 rows x 11 columns] arget_rawDF_cg=
%Time Exclusive Inclusive #Call #Subrs \
0 100.0 0.00616 1:44.607 1.000000e+00 1.000000e+00
1 100.0 35 1:44.607 1.000000e+00 1.334000e+03
2 67.1 40,154 1:10.141 1.010000e+02 1.024140e+05
3 31.9 642 33,350 1.000000e+00 3.000000e+06
4 30.9 15,810 32,279 1.500000e+06 1.321420e+08
5 16.7 17,463 17,463 3.454200e+04 0.000000e+00
6 11.7 12,284 12,284 3.454200e+04 0.000000e+00
7 10.5 10,999 10,999 8.809450e+07 0.000000e+00
8 5.2 5,469 5,469 4.404720e+07 0.000000e+00
9 0.5 0.0388 559 1.000000e+00 3.003910e+00
10 0.5 558 558 1.000000e+00 0.000000e+00
11 0.5 506 506 1.000000e+00 0.000000e+00
12 0.2 245 245 3.454200e+04 0.000000e+00
13 0.2 218 218 1.500000e+06 0.000000e+00
14 0.2 211 211 1.000000e+00 0.000000e+00
15 0.0 4 4 1.000000e+00 0.000000e+00
16 0.0 1 1 1.000000e+00 0.000000e+00
17 0.0 1 1 1.000000e+00 0.000000e+00
18 0.0 0.0667 0.0667 1.000000e+00 0.000000e+00
19 0.0 0.0274 0.0274 1.000000e+00 0.000000e+00
20 0.0 0.0263 0.0269 1.000000e+00 2.000000e+00
21 0.0 0.00215 0.00215 3.906250e-03 0.000000e+00
22 0.0 0.00163 0.00163 9.000000e+00 0.000000e+00
23 0.0 0.00073 0.00073 1.000000e+00 0.000000e+00
24 0.0 0.000719 0.000719 1.000000e+00 0.000000e+00
25 0.0 0.000543 0.000543 3.906250e-03 0.000000e+00
26 0.0 0.000387 0.000387 1.000000e+00 0.000000e+00
27 0.0 0.000309 0.000309 1.000000e+00 0.000000e+00
28 0.0 0.000203 0.000203 1.000000e+00 0.000000e+00
29 0.0 0.000113 0.000113 1.000000e+00 0.000000e+00
Name process na nonzer niter shift
0 .TAU_application 256 1500000 21 100 200
1 CG 256 1500000 21 100 200
2 CONJ_GRAD 256 1500000 21 100 200
3 MAKEA 256 1500000 21 100 200
4 SPRNVC 256 1500000 21 100 200
5 MPI_Wait() 256 1500000 21 100 200
6 MPI_Send() 256 1500000 21 100 200
7 RANDLC 256 1500000 21 100 200
8 ICNVRT 256 1500000 21 100 200
9 INITIALIZE_MPI 256 1500000 21 100 200
10 MPI_Init() 256 1500000 21 100 200
11 MPI_Finalize() 256 1500000 21 100 200
12 MPI_Irecv() 256 1500000 21 100 200
13 VECSET 256 1500000 21 100 200
14 SPARSE 256 1500000 21 100 200
15 ALLOC_SPACE 256 1500000 21 100 200
16 MPI_Barrier() 256 1500000 21 100 200
17 MPI_Bcast() 256 1500000 21 100 200
18 MPI_Reduce() 256 1500000 21 100 200
19 TIMER_START 256 1500000 21 100 200
20 GET_ACTIVE_NPROCS 256 1500000 21 100 200
21 CHECK_TIMER_FLAG 256 1500000 21 100 200
22 TIMER_CLEAR 256 1500000 21 100 200
23 TIMER_STOP 256 1500000 21 100 200
24 SETUP_SUBMATRIX_INFO 256 1500000 21 100 200
25 PRINT_RESULTS 256 1500000 21 100 200
26 MPI_Comm_size() 256 1500000 21 100 200
27 SETUP_PROC_INFO 256 1500000 21 100 200
28 MPI_Comm_rank() 256 1500000 21 100 200
29 TIMER_READ 256 1500000 21 100 200
input_rawDF_mg =
%Time Exclusive Inclusive #Call #Subrs Name process \
0 100.0 0.0155 11,343 1.000000 1.0 .TAU_application 2
1 100.0 0.3 11,343 1.000000 59.5 MG_MPI 2
2 95.8 10,868 10,868 1.000000 0.0 MPI_Finalize() 2
3 4.1 469 469 1.000000 0.0 MPI_Init() 2
4 0.0 0.0405 2 5.000000 105.0 MG3P 2
.. ... ... ... ... ... ... ...
36 0.0 0.00134 0.00134 2.000000 0.0 TIMER_STOP 128
37 0.0 0.0011 0.0011 0.007812 0.0 PRINT_RESULTS 128
38 0.0 0.000391 0.000391 1.000000 0.0 MPI_Comm_size() 128
39 0.0 0.000203 0.000203 1.000000 0.0 MPI_Comm_rank() 128
40 0.0 0.000125 0.000125 1.007810 0.0 TIMER_READ 128
problem_size nit
0 32 4
1 32 4
2 32 4
3 32 4
4 32 4
.. ... ...
36 256 35
37 256 35
38 256 35
39 256 35
40 256 35
[4496 rows x 9 columns] arget_rawDF_mg=
%Time Exclusive Inclusive #Call #Subrs Name \
0 100.0 0.005680 2,440 1.000000 1.000 .TAU_application
1 100.0 0.485000 2,440 1.000000 150.012 MG_MPI
2 42.7 1.000000 1,042 51.000000 2091.000 MG3P
3 27.7 408.000000 677 461.000000 461.000 RESID
4 23.7 3.000000 577 1330.000000 20309.400 COMM3
5 22.3 543.000000 543 1.000000 0.000 MPI_Init()
6 21.2 518.000000 518 1.000000 0.000 MPI_Finalize()
7 13.0 144.000000 317 459.000000 459.000 PSINV
8 10.4 31.000000 254 6698.620000 6698.620 GIVE3
9 9.1 222.000000 222 6902.620000 0.000 MPI_Send()
10 8.8 215.000000 215 6902.620000 0.000 MPI_Wait()
11 8.8 24.000000 214 6698.620000 6698.620 TAKE3
12 7.9 60.000000 192 408.000000 408.000 RPRJ3
13 5.8 113.000000 142 408.000000 408.000 INTERP
14 4.4 103.000000 108 6902.620000 6902.620 READY
15 1.2 0.241000 28 408.000000 612.000 COMM3_EX
16 1.1 7.000000 26 2.000000 17079.800 ZRAN3
17 1.1 0.076100 25 204.000000 204.000 TAKE3_EX
18 0.6 14.000000 14 625.562000 0.000 ZERO3
19 0.3 4.000000 6 4.000000 8.000 NORM2U3
20 0.3 6.000000 6 6.000000 0.000 MPI_Barrier()
21 0.2 4.000000 4 6902.620000 0.000 MPI_Irecv()
22 0.2 3.000000 3 88.000000 0.000 MPI_Allreduce()
23 0.1 3.000000 3 8192.000000 0.000 VRANLC
24 0.1 1.000000 1 7.000000 0.000 MPI_Bcast()
25 0.1 1.000000 1 8442.270000 0.000 RANDLC
26 0.1 1.000000 1 1.000000 0.000 ALLOC_SPACE
27 0.0 0.078600 0.305 204.000000 204.000 GIVE3_EX
28 0.0 0.145000 0.145 2.000000 0.000 TIMER_START
29 0.0 0.085200 0.0852 471.828000 0.000 BUBBLE
30 0.0 0.023000 0.0419 6.000000 120.266 POWER
31 0.0 0.028900 0.0296 1.000000 2.000 GET_ACTIVE_NPROCS
32 0.0 0.014300 0.0143 2.000000 0.000 SETUP
33 0.0 0.014300 0.0143 1.000000 0.000 MPI_Reduce()
34 0.0 0.003240 0.00324 17.000000 0.000 TIMER_CLEAR
35 0.0 0.001960 0.00196 0.003906 0.000 CHECK_TIMER_FLAG
36 0.0 0.001600 0.0016 2.000000 0.000 TIMER_STOP
37 0.0 0.000551 0.000551 0.003906 0.000 PRINT_RESULTS
38 0.0 0.000453 0.000453 1.000000 0.000 MPI_Comm_size()
39 0.0 0.000254 0.000254 1.000000 0.000 MPI_Comm_rank()
40 0.0 0.000152 0.000152 1.003910 0.000 TIMER_READ
process problem_size nit
0 256 512 50
1 256 512 50
2 256 512 50
3 256 512 50
4 256 512 50
5 256 512 50
6 256 512 50
7 256 512 50
8 256 512 50
9 256 512 50
10 256 512 50
11 256 512 50
12 256 512 50
13 256 512 50
14 256 512 50
15 256 512 50
16 256 512 50
17 256 512 50
18 256 512 50
19 256 512 50
20 256 512 50
21 256 512 50
22 256 512 50
23 256 512 50
24 256 512 50
25 256 512 50
26 256 512 50
27 256 512 50
28 256 512 50
29 256 512 50
30 256 512 50
31 256 512 50
32 256 512 50
33 256 512 50
34 256 512 50
35 256 512 50
36 256 512 50
37 256 512 50
38 256 512 50
39 256 512 50
40 256 512 50
print(f"cg columns = {input_rawDF_cg.columns.tolist()}")
print(f"mg columns = {input_rawDF_mg.columns.tolist()}")
cg columns = ['%Time', 'Exclusive', 'Inclusive', '#Call', '#Subrs', 'Name', 'process', 'na', 'nonzer', 'niter', 'shift'] mg columns = ['%Time', 'Exclusive', 'Inclusive', '#Call', '#Subrs', 'Name', 'process', 'problem_size', 'nit']
cg_list_exp: list[str] = ["process", "nonzer", "niter", "shift"]
mg_list_exp: list[str] = ["process", "problem_size", "nit"]
list_res: list[str] = ["#Call"]
result_series_list: list[pd.DataFrame] = []
function_names: list[str] = list(set(input_rawDF_cg["Name"].tolist()))
input_rawDF_cg = input_rawDF_cg.rename(columns={"Name": "functionName"})
target_rawDF_cg = target_rawDF_cg.rename(columns={"Name": "functionName"})
for function_name in function_names:
input_rawDF_per_function: pd.DataFrame = input_rawDF_cg[
input_rawDF_cg["functionName"] == function_name
]
models = Models(
inputDF=input_rawDF_per_function,
expVarColNames=cg_list_exp,
resVarColNames=list_res,
targetDF=None,
modelNames=list_modelName,
)
models.setUpDataBeforeCalcLr()
models.calcLr()
models.calcMAPE()
dictCalcedMAPE = models.returnCalculatedMAPE()
for key in dictCalcedMAPE.keys():
dictCalcedMAPE[key] = float(dictCalcedMAPE[key])
dict_for_series: dict = copy.deepcopy(dictCalcedMAPE)
dict_for_series["functionName"] = function_name
series: pd.Series = pd.Series(dict_for_series)
result_series_list.append(series)
resultDF: pd.DataFrame = pd.DataFrame(result_series_list)
resultDF = addLowestMAPEColumn(
inputDF=resultDF, model_name_list=list_modelName, version=2
)
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
resultDF
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | modelLogAndIp | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | functionName | 最低値 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | TIMER_READ | 0.000000e+00 |
| 1 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | CG | 0.000000e+00 |
| 2 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | INITIALIZE_MPI | 0.000000e+00 |
| 3 | 3.425747e+01 | 5.256297e+01 | 45.284268 | 6.296323e+01 | 3.007492e+02 | 57.396655 | 44.259878 | 4.179520e+01 | 4.584256e+01 | 4.102758e+01 | 55.026592 | 24.256440 | 1.193839e+01 | 28.275980 | 36.185272 | MPI_Send() | 1.193839e+01 |
| 4 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | SPARSE | 0.000000e+00 |
| 5 | 1.485142e+02 | 1.485127e+02 | 148.489142 | 6.845774e+01 | 6.845669e+01 | 148.512699 | 148.489145 | 1.485143e+02 | 1.484892e+02 | 1.485142e+02 | 148.512696 | 149.985025 | 1.485141e+02 | 149.097332 | 149.202129 | ICNVRT | 6.845669e+01 |
| 6 | 1.485140e+02 | 1.485125e+02 | 148.488900 | 6.845772e+01 | 6.845567e+01 | 148.512456 | 148.488902 | 1.485140e+02 | 1.484889e+02 | 1.485140e+02 | 148.512452 | 149.984780 | 1.485139e+02 | 149.097089 | 149.201887 | RANDLC | 6.845567e+01 |
| 7 | 1.114810e+02 | 1.114810e+02 | 111.481028 | 5.984417e+01 | 5.984408e+01 | 111.481027 | 111.481029 | 1.114810e+02 | 1.114810e+02 | 1.114810e+02 | 111.481025 | 111.481049 | 1.114810e+02 | 111.480967 | 111.480967 | SPRNVC | 5.984408e+01 |
| 8 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Comm_size() | 0.000000e+00 |
| 9 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | SETUP_SUBMATRIX_INFO | 0.000000e+00 |
| 10 | 4.319118e-14 | 3.149704e+01 | 17.669188 | 7.197893e+01 | 9.357418e+01 | 31.497043 | 17.669190 | 1.438473e-13 | 1.766919e+01 | 3.552458e-14 | 31.497041 | 14.043541 | 2.387129e-13 | 17.062834 | 22.349547 | CONJ_GRAD | 3.552458e-14 |
| 11 | 3.006195e+02 | 2.860064e-12 | 224.267995 | 7.922749e+01 | 1.740245e+01 | 300.619546 | 300.619534 | 2.882758e-12 | 2.722149e-12 | 2.242680e+02 | 224.267999 | 291.681004 | 3.798761e-12 | 282.393004 | 301.348598 | PRINT_RESULTS | 2.722149e-12 |
| 12 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Barrier() | 0.000000e+00 |
| 13 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | GET_ACTIVE_NPROCS | 0.000000e+00 |
| 14 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | SETUP_PROC_INFO | 0.000000e+00 |
| 15 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | TIMER_STOP | 0.000000e+00 |
| 16 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Finalize() | 0.000000e+00 |
| 17 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | .TAU_application | 0.000000e+00 |
| 18 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Init() | 0.000000e+00 |
| 19 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | ALLOC_SPACE | 0.000000e+00 |
| 20 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Reduce() | 0.000000e+00 |
| 21 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Bcast() | 0.000000e+00 |
| 22 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | TIMER_START | 0.000000e+00 |
| 23 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 8.441817e-09 | 4.184421e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | TIMER_CLEAR | 0.000000e+00 |
| 24 | 3.425747e+01 | 5.256297e+01 | 45.284268 | 6.296323e+01 | 3.007492e+02 | 57.396655 | 44.259878 | 4.179520e+01 | 4.584256e+01 | 4.102758e+01 | 55.026592 | 24.256440 | 1.193839e+01 | 28.275980 | 36.185272 | MPI_Wait() | 1.193839e+01 |
| 25 | 3.425747e+01 | 5.256297e+01 | 45.284268 | 6.296323e+01 | 3.007492e+02 | 57.396655 | 44.259878 | 4.179520e+01 | 4.584256e+01 | 4.102758e+01 | 55.026592 | 24.256440 | 1.193839e+01 | 28.275980 | 36.185272 | MPI_Irecv() | 1.193839e+01 |
| 26 | 1.114810e+02 | 1.114810e+02 | 111.481028 | 5.984417e+01 | 5.984408e+01 | 111.481027 | 111.481029 | 1.114810e+02 | 1.114810e+02 | 1.114810e+02 | 111.481025 | 111.481049 | 1.114810e+02 | 111.480967 | 111.480967 | VECSET | 5.984408e+01 |
| 27 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MAKEA | 0.000000e+00 |
| 28 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 1.403751e-08 | 9.611779e-09 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | MPI_Comm_rank() | 0.000000e+00 |
| 29 | 3.006195e+02 | 2.860064e-12 | 224.267995 | 7.922749e+01 | 1.740245e+01 | 300.619546 | 300.619534 | 2.882758e-12 | 2.722149e-12 | 2.242680e+02 | 224.267999 | 291.681004 | 3.798761e-12 | 282.393004 | 301.348598 | CHECK_TIMER_FLAG | 2.722149e-12 |
list_series: list[pd.Series] = []
for functionName in function_names:
rawDF_per_function_train: pd.DataFrame = input_rawDF_cg[
input_rawDF_cg["functionName"] == functionName
]
rawDF_per_function_test: pd.DataFrame = target_rawDF_cg[
target_rawDF_cg["functionName"] == functionName
]
bestModelDict: dict = return_bestModelObject(
inputDF=rawDF_per_function_train,
list_expVar=cg_list_exp,
list_resVar=list_res,
list_modelName=list_modelName,
)
bestModel = bestModelDict["object"]
predicted = float(
np.array(bestModel.predict(inputDF=rawDF_per_function_test[cg_list_exp]))
)
_call: float = float(rawDF_per_function_test.iloc[0][list_res[0]])
_MAPE: float = float(returnMapeScore(l1=[_call], l2=[predicted]))
_series: pd.Series = pd.Series(
{
"functionName": functionName,
"call": _call,
"MAPE": _MAPE,
"predicted_call": predicted,
}
)
list_series.append(_series)
df_toCalcWeightedMAPE: pd.DataFrame = pd.concat(list_series, axis=1).T
retNum: float = calcWeightedMAPEscore(
inputDF=df_toCalcWeightedMAPE,
inputColumnDict={"funcName": "functionName", "call": "call", "MAPE": "MAPE"},
)
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
df_toCalcWeightedMAPE
| functionName | call | MAPE | predicted_call | |
|---|---|---|---|---|
| 0 | TIMER_READ | 1.0 | 0.0 | 1.0 |
| 1 | CG | 1.0 | 0.0 | 1.0 |
| 2 | INITIALIZE_MPI | 1.0 | 0.0 | 1.0 |
| 3 | MPI_Send() | 34542.0 | 47.31987 | 50887.22966 |
| 4 | SPARSE | 1.0 | 0.0 | 1.0 |
| 5 | ICNVRT | 44047200.0 | 97.596563 | 1058646.868729 |
| 6 | RANDLC | 88094500.0 | 97.596562 | 2117296.823624 |
| 7 | SPRNVC | 1500000.0 | 96.350477 | 54742.849782 |
| 8 | MPI_Comm_size() | 1.0 | 0.0 | 1.0 |
| 9 | SETUP_SUBMATRIX_INFO | 1.0 | 0.0 | 1.0 |
| 10 | CONJ_GRAD | 101.0 | 0.0 | 101.0 |
| 11 | PRINT_RESULTS | 0.003906 | 0.0 | 0.003906 |
| 12 | MPI_Barrier() | 1.0 | 0.0 | 1.0 |
| 13 | GET_ACTIVE_NPROCS | 1.0 | 0.0 | 1.0 |
| 14 | SETUP_PROC_INFO | 1.0 | 0.0 | 1.0 |
| 15 | TIMER_STOP | 1.0 | 0.0 | 1.0 |
| 16 | MPI_Finalize() | 1.0 | 0.0 | 1.0 |
| 17 | .TAU_application | 1.0 | 0.0 | 1.0 |
| 18 | MPI_Init() | 1.0 | 0.0 | 1.0 |
| 19 | ALLOC_SPACE | 1.0 | 0.0 | 1.0 |
| 20 | MPI_Reduce() | 1.0 | 0.0 | 1.0 |
| 21 | MPI_Bcast() | 1.0 | 0.0 | 1.0 |
| 22 | TIMER_START | 1.0 | 0.0 | 1.0 |
| 23 | TIMER_CLEAR | 9.0 | 0.0 | 9.0 |
| 24 | MPI_Wait() | 34542.0 | 47.31987 | 50887.22966 |
| 25 | MPI_Irecv() | 34542.0 | 47.31987 | 50887.22966 |
| 26 | VECSET | 1500000.0 | 96.350477 | 54742.849782 |
| 27 | MAKEA | 1.0 | 0.0 | 1.0 |
| 28 | MPI_Comm_rank() | 1.0 | 0.0 | 1.0 |
| 29 | CHECK_TIMER_FLAG | 0.003906 | 0.0 | 0.003906 |
print(df_toCalcWeightedMAPE.style.to_latex())
\begin{tabular}{lllll}
& functionName & call & MAPE & predicted_call \\
0 & TIMER_READ & 1.000000 & 0.000000 & 1.000000 \\
1 & CG & 1.000000 & 0.000000 & 1.000000 \\
2 & INITIALIZE_MPI & 1.000000 & 0.000000 & 1.000000 \\
3 & MPI_Send() & 34542.000000 & 47.319870 & 50887.229660 \\
4 & SPARSE & 1.000000 & 0.000000 & 1.000000 \\
5 & ICNVRT & 44047200.000000 & 97.596563 & 1058646.868729 \\
6 & RANDLC & 88094500.000000 & 97.596562 & 2117296.823624 \\
7 & SPRNVC & 1500000.000000 & 96.350477 & 54742.849782 \\
8 & MPI_Comm_size() & 1.000000 & 0.000000 & 1.000000 \\
9 & SETUP_SUBMATRIX_INFO & 1.000000 & 0.000000 & 1.000000 \\
10 & CONJ_GRAD & 101.000000 & 0.000000 & 101.000000 \\
11 & PRINT_RESULTS & 0.003906 & 0.000000 & 0.003906 \\
12 & MPI_Barrier() & 1.000000 & 0.000000 & 1.000000 \\
13 & GET_ACTIVE_NPROCS & 1.000000 & 0.000000 & 1.000000 \\
14 & SETUP_PROC_INFO & 1.000000 & 0.000000 & 1.000000 \\
15 & TIMER_STOP & 1.000000 & 0.000000 & 1.000000 \\
16 & MPI_Finalize() & 1.000000 & 0.000000 & 1.000000 \\
17 & .TAU_application & 1.000000 & 0.000000 & 1.000000 \\
18 & MPI_Init() & 1.000000 & 0.000000 & 1.000000 \\
19 & ALLOC_SPACE & 1.000000 & 0.000000 & 1.000000 \\
20 & MPI_Reduce() & 1.000000 & 0.000000 & 1.000000 \\
21 & MPI_Bcast() & 1.000000 & 0.000000 & 1.000000 \\
22 & TIMER_START & 1.000000 & 0.000000 & 1.000000 \\
23 & TIMER_CLEAR & 9.000000 & 0.000000 & 9.000000 \\
24 & MPI_Wait() & 34542.000000 & 47.319870 & 50887.229660 \\
25 & MPI_Irecv() & 34542.000000 & 47.319870 & 50887.229660 \\
26 & VECSET & 1500000.000000 & 96.350477 & 54742.849782 \\
27 & MAKEA & 1.000000 & 0.000000 & 1.000000 \\
28 & MPI_Comm_rank() & 1.000000 & 0.000000 & 1.000000 \\
29 & CHECK_TIMER_FLAG & 0.003906 & 0.000000 & 0.003906 \\
\end{tabular}
retNum
97.53030613076402
result_series_list: list[pd.DataFrame] = []
function_names: list[str] = list(set(input_rawDF_mg["Name"].tolist()))
input_rawDF_mg = input_rawDF_mg.rename(columns={"Name": "functionName"})
target_rawDF_mg = target_rawDF_mg.rename(columns={"Name": "functionName"})
for function_name in function_names:
input_rawDF_per_function: pd.DataFrame = input_rawDF_mg[
input_rawDF_mg["functionName"] == function_name
]
models = Models(
inputDF=input_rawDF_per_function,
expVarColNames=mg_list_exp,
resVarColNames=list_res,
targetDF=None,
modelNames=list_modelName,
)
models.setUpDataBeforeCalcLr()
models.calcLr()
models.calcMAPE()
dictCalcedMAPE = models.returnCalculatedMAPE()
for key in dictCalcedMAPE.keys():
dictCalcedMAPE[key] = float(dictCalcedMAPE[key])
dict_for_series: dict = copy.deepcopy(dictCalcedMAPE)
dict_for_series["functionName"] = function_name
series: pd.Series = pd.Series(dict_for_series)
result_series_list.append(series)
resultDF: pd.DataFrame = pd.DataFrame(result_series_list)
resultDF = addLowestMAPEColumn(
inputDF=resultDF, model_name_list=list_modelName, version=2
)
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
list_series: list[pd.Series] = []
for functionName in function_names:
rawDF_per_function_train: pd.DataFrame = input_rawDF_mg[
input_rawDF_mg["functionName"] == functionName
]
rawDF_per_function_test: pd.DataFrame = target_rawDF_mg[
target_rawDF_mg["functionName"] == functionName
]
bestModelDict: dict = return_bestModelObject(
inputDF=rawDF_per_function_train,
list_expVar=mg_list_exp,
list_resVar=list_res,
list_modelName=list_modelName,
)
bestModel = bestModelDict["object"]
predicted = float(
np.array(bestModel.predict(inputDF=rawDF_per_function_test[mg_list_exp]))
)
_call: float = float(rawDF_per_function_test.iloc[0][list_res[0]])
_MAPE: float = float(returnMapeScore(l1=[_call], l2=[predicted]))
_series: pd.Series = pd.Series(
{
"functionName": functionName,
"call": _call,
"MAPE": _MAPE,
"predicted_call": predicted,
}
)
list_series.append(_series)
df_toCalcWeightedMAPE: pd.DataFrame = pd.concat(list_series, axis=1).T
retNum: float = calcWeightedMAPEscore(
inputDF=df_toCalcWeightedMAPE,
inputColumnDict={"funcName": "functionName", "call": "call", "MAPE": "MAPE"},
)
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
df_toCalcWeightedMAPE
| functionName | call | MAPE | predicted_call | |
|---|---|---|---|---|
| 0 | TIMER_READ | 1.00391 | 0.001083 | 1.003899 |
| 1 | SETUP | 2.0 | 0.0 | 2.0 |
| 2 | MG3P | 51.0 | 0.0 | 51.0 |
| 3 | RPRJ3 | 408.0 | 30.0 | 530.4 |
| 4 | TAKE3 | 6698.62 | 22.791658 | 8225.34657 |
| 5 | COMM3 | 1330.0 | 27.609023 | 1697.2 |
| 6 | MPI_Send() | 6902.62 | 24.376525 | 8585.238874 |
| 7 | GIVE3 | 6698.62 | 22.791658 | 8225.34657 |
| 8 | RANDLC | 8442.27 | 77.096568 | 1933.569607 |
| 9 | MPI_Comm_size() | 1.0 | 0.0 | 1.0 |
| 10 | MPI_Allreduce() | 88.0 | 0.0 | 88.0 |
| 11 | PSINV | 459.0 | 26.666667 | 581.4 |
| 12 | BUBBLE | 471.828 | 0.427206 | 473.843679 |
| 13 | READY | 6902.62 | 24.376525 | 8585.238874 |
| 14 | PRINT_RESULTS | 0.003906 | 0.0 | 0.003906 |
| 15 | MPI_Barrier() | 6.0 | 0.0 | 6.0 |
| 16 | RESID | 461.0 | 26.550976 | 583.4 |
| 17 | ZRAN3 | 2.0 | 0.0 | 2.0 |
| 18 | GET_ACTIVE_NPROCS | 1.0 | 0.0 | 1.0 |
| 19 | TIMER_STOP | 2.0 | 0.0 | 2.0 |
| 20 | MPI_Finalize() | 1.0 | 0.0 | 1.0 |
| 21 | .TAU_application | 1.0 | 0.0 | 1.0 |
| 22 | MPI_Init() | 1.0 | 0.0 | 1.0 |
| 23 | MG_MPI | 1.0 | 0.0 | 1.0 |
| 24 | COMM3_EX | 408.0 | 30.0 | 530.4 |
| 25 | INTERP | 408.0 | 30.0 | 530.4 |
| 26 | POWER | 6.0 | 0.0 | 6.0 |
| 27 | ALLOC_SPACE | 1.0 | 0.0 | 1.0 |
| 28 | TAKE3_EX | 204.0 | 11.910377 | 228.29717 |
| 29 | GIVE3_EX | 204.0 | 11.910377 | 228.29717 |
| 30 | VRANLC | 8192.0 | 78.111242 | 1793.127042 |
| 31 | MPI_Reduce() | 1.0 | 0.0 | 1.0 |
| 32 | ZERO3 | 625.562 | 37.589704 | 860.708905 |
| 33 | MPI_Bcast() | 7.0 | 0.0 | 7.0 |
| 34 | TIMER_START | 2.0 | 0.0 | 2.0 |
| 35 | TIMER_CLEAR | 17.0 | 0.0 | 17.0 |
| 36 | MPI_Wait() | 6902.62 | 24.376525 | 8585.238874 |
| 37 | MPI_Irecv() | 6902.62 | 24.376525 | 8585.238874 |
| 38 | MPI_Comm_rank() | 1.0 | 0.0 | 1.0 |
| 39 | CHECK_TIMER_FLAG | 0.003906 | 0.0 | 0.003906 |
| 40 | NORM2U3 | 4.0 | 0.0 | 4.0 |
print(df_toCalcWeightedMAPE.style.to_latex())
\begin{tabular}{lllll}
& functionName & call & MAPE & predicted_call \\
0 & TIMER_READ & 1.003910 & 0.001083 & 1.003899 \\
1 & SETUP & 2.000000 & 0.000000 & 2.000000 \\
2 & MG3P & 51.000000 & 0.000000 & 51.000000 \\
3 & RPRJ3 & 408.000000 & 30.000000 & 530.400000 \\
4 & TAKE3 & 6698.620000 & 22.791658 & 8225.346570 \\
5 & COMM3 & 1330.000000 & 27.609023 & 1697.200000 \\
6 & MPI_Send() & 6902.620000 & 24.376525 & 8585.238874 \\
7 & GIVE3 & 6698.620000 & 22.791658 & 8225.346570 \\
8 & RANDLC & 8442.270000 & 77.096568 & 1933.569607 \\
9 & MPI_Comm_size() & 1.000000 & 0.000000 & 1.000000 \\
10 & MPI_Allreduce() & 88.000000 & 0.000000 & 88.000000 \\
11 & PSINV & 459.000000 & 26.666667 & 581.400000 \\
12 & BUBBLE & 471.828000 & 0.427206 & 473.843679 \\
13 & READY & 6902.620000 & 24.376525 & 8585.238874 \\
14 & PRINT_RESULTS & 0.003906 & 0.000000 & 0.003906 \\
15 & MPI_Barrier() & 6.000000 & 0.000000 & 6.000000 \\
16 & RESID & 461.000000 & 26.550976 & 583.400000 \\
17 & ZRAN3 & 2.000000 & 0.000000 & 2.000000 \\
18 & GET_ACTIVE_NPROCS & 1.000000 & 0.000000 & 1.000000 \\
19 & TIMER_STOP & 2.000000 & 0.000000 & 2.000000 \\
20 & MPI_Finalize() & 1.000000 & 0.000000 & 1.000000 \\
21 & .TAU_application & 1.000000 & 0.000000 & 1.000000 \\
22 & MPI_Init() & 1.000000 & 0.000000 & 1.000000 \\
23 & MG_MPI & 1.000000 & 0.000000 & 1.000000 \\
24 & COMM3_EX & 408.000000 & 30.000000 & 530.400000 \\
25 & INTERP & 408.000000 & 30.000000 & 530.400000 \\
26 & POWER & 6.000000 & 0.000000 & 6.000000 \\
27 & ALLOC_SPACE & 1.000000 & 0.000000 & 1.000000 \\
28 & TAKE3_EX & 204.000000 & 11.910377 & 228.297170 \\
29 & GIVE3_EX & 204.000000 & 11.910377 & 228.297170 \\
30 & VRANLC & 8192.000000 & 78.111242 & 1793.127042 \\
31 & MPI_Reduce() & 1.000000 & 0.000000 & 1.000000 \\
32 & ZERO3 & 625.562000 & 37.589704 & 860.708905 \\
33 & MPI_Bcast() & 7.000000 & 0.000000 & 7.000000 \\
34 & TIMER_START & 2.000000 & 0.000000 & 2.000000 \\
35 & TIMER_CLEAR & 17.000000 & 0.000000 & 17.000000 \\
36 & MPI_Wait() & 6902.620000 & 24.376525 & 8585.238874 \\
37 & MPI_Irecv() & 6902.620000 & 24.376525 & 8585.238874 \\
38 & MPI_Comm_rank() & 1.000000 & 0.000000 & 1.000000 \\
39 & CHECK_TIMER_FLAG & 0.003906 & 0.000000 & 0.003906 \\
40 & NORM2U3 & 4.000000 & 0.000000 & 4.000000 \\
\end{tabular}
retNum
38.13605898125475
%reset -f
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
problem_sizes: list[str] = ["A", "B", "C"]
processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLinearSumOf2elementCombinationWithSquared",
"modelLinearSumOf2elementCombinationWithCubed",
"modelLin"
# "modelBasicTree",
]
rawDF_cg: pd.DataFrame = return_rawDF_with_init_param(
benchmark_name="cg",
classes=problem_sizes,
processes=processes,
csv_dir_path=csvDirPath,
)
dfMAPE: pd.DataFrame = returnMAPEDFFromRawDF(
input_rawDF=rawDF_cg, model_names_list=list_modelName
)
dfMAPEwithLowestCG: pd.DataFrame = addLowestMAPEColumn(
inputDF=dfMAPE, model_name_list=list_modelName, version=2
)
dfMAPEwithLowestCG
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | modelLogAndIp | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | functionName | 最低値 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | CG | 0.000000 |
| 1 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | INITIALIZE_MPI | 0.000000 |
| 2 | 42.853850 | 44.792234 | 44.637550 | 4.066787e+01 | 4.797896e+01 | 42.853850 | 42.853850 | 44.792234 | 44.939341 | 44.587383 | 44.587383 | 19.345180 | 11.790055 | 14.618719 | 15.649341 | MPI_Send() | 11.790055 |
| 3 | 45.026551 | 73.645886 | 67.996981 | 7.122807e+01 | 5.766271e+01 | 45.026551 | 45.026551 | 73.645886 | 73.668652 | 68.167161 | 68.167161 | 23.359718 | 5.551456 | 17.496206 | 18.823102 | ICNVRT | 5.551456 |
| 4 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | SPARSE | 0.000000 |
| 5 | 25.908814 | 32.444780 | 33.169313 | 6.389732e+01 | 5.057944e+01 | 25.908814 | 25.908814 | 32.444780 | 32.457134 | 33.273730 | 33.273730 | 18.765479 | 4.542515 | 14.116646 | 15.163521 | SPRNVC | 4.542515 |
| 6 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Comm_size() | 0.000000 |
| 7 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | SETUP_SUBMATRIX_INFO | 0.000000 |
| 8 | 15.477452 | 18.684626 | 18.377890 | 1.653478e+02 | 5.891333e+01 | 15.477452 | 15.477452 | 18.684626 | 18.696354 | 18.378256 | 18.378256 | 9.021079 | 2.140933 | 6.743539 | 7.259649 | CONJ_GRAD | 2.140933 |
| 9 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Barrier() | 0.000000 |
| 10 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | SETUP_PROC_INFO | 0.000000 |
| 11 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Finalize() | 0.000000 |
| 12 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | .TAU_application | 0.000000 |
| 13 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Init() | 0.000000 |
| 14 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | ALLOC_SPACE | 0.000000 |
| 15 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Reduce() | 0.000000 |
| 16 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Bcast() | 0.000000 |
| 17 | 42.853850 | 44.792234 | 44.637550 | 4.066787e+01 | 4.797896e+01 | 42.853850 | 42.853850 | 44.792234 | 44.939341 | 44.587383 | 44.587383 | 19.345180 | 11.790055 | 14.618719 | 15.649341 | MPI_Wait() | 11.790055 |
| 18 | 42.853850 | 44.792234 | 44.637550 | 4.066787e+01 | 4.797896e+01 | 42.853850 | 42.853850 | 44.792234 | 44.939341 | 44.587383 | 44.587383 | 19.345180 | 11.790055 | 14.618719 | 15.649341 | MPI_Irecv() | 11.790055 |
| 19 | 25.908814 | 32.444780 | 33.169313 | 6.389732e+01 | 5.057944e+01 | 25.908814 | 25.908814 | 32.444780 | 32.457134 | 33.273730 | 33.273730 | 18.765479 | 4.542515 | 14.116646 | 15.163521 | VECSET | 4.542515 |
| 20 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MAKEA | 0.000000 |
| 21 | 0.000000 | 0.000000 | 0.000000 | 2.478176e-08 | 2.281483e-07 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | MPI_Comm_rank() | 0.000000 |
rawDF_mg: pd.DataFrame = return_rawDF_with_init_param(
benchmark_name="mg",
classes=problem_sizes,
processes=processes,
csv_dir_path=csvDirPath,
)
dfMAPE: pd.DataFrame = returnMAPEDFFromRawDF(
input_rawDF=rawDF_mg, model_names_list=list_modelName
)
dfMAPEwithLowestMG: pd.DataFrame = addLowestMAPEColumn(
inputDF=dfMAPE, model_name_list=list_modelName, version=2
)
dfMAPEwithLowestMG
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | modelLogAndIp | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | functionName | 最低値 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.295332e-08 | 4.083486e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | SETUP | 0.000000e+00 |
| 1 | 1.184238e-14 | 9.618912e-14 | 6.767074e-15 | 6.895029e+01 | 4.112160e+01 | 6.428720e-14 | 0.000000e+00 | 3.721891e-14 | 5.180034e-14 | 2.513485e-14 | 5.623116e-14 | 2.573905e-14 | 1.752189e-13 | 5.143782e-14 | 9.888789e-14 | MG3P | 0.000000e+00 |
| 2 | 1.836777e-14 | 2.080070e-13 | 2.255691e-14 | 4.651708e+01 | 4.422247e+01 | 4.833624e-15 | 3.830072e-14 | 2.481260e-14 | 6.541505e-14 | 1.288966e-14 | 2.706829e-14 | 1.832174e-14 | 1.786369e-13 | 2.819614e-14 | 6.212358e-14 | RPRJ3 | 4.833624e-15 |
| 3 | 4.045720e+00 | 3.954122e+00 | 3.906875e+00 | 5.559944e+01 | 4.277226e+01 | 4.045720e+00 | 4.045720e+00 | 3.954122e+00 | 3.954122e+00 | 3.906875e+00 | 3.906875e+00 | 1.042579e+00 | 8.803299e-01 | 1.421553e+00 | 1.540745e+00 | TAKE3 | 8.803299e-01 |
| 4 | 2.095057e-14 | 9.265332e-14 | 9.303321e-14 | 6.830741e+01 | 4.347387e+01 | 1.323826e-13 | 1.378022e-14 | 3.015581e-14 | 1.378022e-14 | 1.592253e-14 | 7.147155e-14 | 2.865717e-14 | 2.306363e-13 | 2.445818e-14 | 8.122954e-14 | COMM3 | 1.378022e-14 |
| 5 | 3.254461e+00 | 3.126972e+00 | 3.172951e+00 | 5.748798e+01 | 4.291667e+01 | 3.254461e+00 | 3.254461e+00 | 3.126972e+00 | 3.126972e+00 | 3.172951e+00 | 3.172951e+00 | 9.083516e-01 | 8.217146e-01 | 1.172540e+00 | 1.261177e+00 | MPI_Send() | 8.217146e-01 |
| 6 | 4.045720e+00 | 3.954122e+00 | 3.906875e+00 | 5.559944e+01 | 4.277226e+01 | 4.045720e+00 | 4.045720e+00 | 3.954122e+00 | 3.954122e+00 | 3.906875e+00 | 3.906875e+00 | 1.042579e+00 | 8.803299e-01 | 1.421553e+00 | 1.540745e+00 | GIVE3 | 8.803299e-01 |
| 7 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Comm_size() | 0.000000e+00 |
| 8 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.216630e-08 | 1.771030e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Allreduce() | 0.000000e+00 |
| 9 | 3.113212e-14 | 4.296555e-15 | 3.433663e-14 | 6.216573e+01 | 4.386407e+01 | 2.771278e-14 | 4.436193e-14 | 2.173788e-14 | 4.597314e-14 | 2.164837e-14 | 4.398598e-14 | 1.915547e-14 | 3.135053e-13 | 5.151838e-14 | 9.822103e-14 | PSINV | 4.296555e-15 |
| 10 | 3.735519e+00 | 4.793979e+00 | 8.735875e-01 | 6.697317e+00 | 6.547316e+00 | 3.735519e+00 | 3.735519e+00 | 4.793979e+00 | 4.793979e+00 | 8.735875e-01 | 8.735875e-01 | 4.296069e+00 | 1.631188e+00 | 3.846494e+00 | 4.096030e+00 | BUBBLE | 8.735875e-01 |
| 11 | 3.254461e+00 | 3.126972e+00 | 3.172951e+00 | 5.748798e+01 | 4.291667e+01 | 3.254461e+00 | 3.254461e+00 | 3.126972e+00 | 3.126972e+00 | 3.172951e+00 | 3.172951e+00 | 9.083516e-01 | 8.217146e-01 | 1.172540e+00 | 1.261177e+00 | READY | 8.217146e-01 |
| 12 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.200988e-08 | 2.365411e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Barrier() | 0.000000e+00 |
| 13 | 3.005094e-14 | 4.251565e-15 | 3.308996e-14 | 4.560134e+01 | 4.314865e+01 | 2.653754e-14 | 4.301027e-14 | 2.109343e-14 | 4.460253e-14 | 2.100590e-14 | 4.189141e-14 | 1.832539e-14 | 3.041476e-13 | 4.972946e-14 | 9.547591e-14 | RESID | 4.251565e-15 |
| 14 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.295332e-08 | 4.083486e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | ZRAN3 | 0.000000e+00 |
| 15 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Finalize() | 0.000000e+00 |
| 16 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | .TAU_application | 0.000000e+00 |
| 17 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Init() | 0.000000e+00 |
| 18 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MG_MPI | 0.000000e+00 |
| 19 | 1.836777e-14 | 2.080070e-13 | 2.255691e-14 | 4.651708e+01 | 4.422247e+01 | 4.833624e-15 | 3.830072e-14 | 2.481260e-14 | 6.541505e-14 | 1.288966e-14 | 2.706829e-14 | 1.832174e-14 | 1.786369e-13 | 2.819614e-14 | 6.212358e-14 | COMM3_EX | 4.833624e-15 |
| 20 | 1.836777e-14 | 2.080070e-13 | 2.255691e-14 | 4.651708e+01 | 4.422247e+01 | 4.833624e-15 | 3.830072e-14 | 2.481260e-14 | 6.541505e-14 | 1.288966e-14 | 2.706829e-14 | 1.832174e-14 | 1.786369e-13 | 2.819614e-14 | 6.212358e-14 | INTERP | 4.833624e-15 |
| 21 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.200988e-08 | 2.365411e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | POWER | 0.000000e+00 |
| 22 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | ALLOC_SPACE | 0.000000e+00 |
| 23 | 4.897181e+01 | 5.301695e+01 | 5.176197e+01 | 4.976274e+01 | 7.880812e+01 | 4.897181e+01 | 4.897181e+01 | 5.301695e+01 | 5.301695e+01 | 5.176197e+01 | 5.176197e+01 | 2.077337e+01 | 1.106619e+01 | 1.944444e+01 | 2.068836e+01 | TAKE3_EX | 1.106619e+01 |
| 24 | 4.897181e+01 | 5.301695e+01 | 5.176197e+01 | 4.976274e+01 | 7.880812e+01 | 4.897181e+01 | 4.897181e+01 | 5.301695e+01 | 5.301695e+01 | 5.176197e+01 | 5.176197e+01 | 2.077337e+01 | 1.106619e+01 | 1.944444e+01 | 2.068836e+01 | GIVE3_EX | 1.106619e+01 |
| 25 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Reduce() | 0.000000e+00 |
| 26 | 9.991909e+00 | 1.053899e+01 | 9.967322e+00 | 3.894268e+03 | 4.498368e+01 | 9.991909e+00 | 9.991909e+00 | 1.053899e+01 | 1.053899e+01 | 9.967322e+00 | 9.967322e+00 | 2.905991e+00 | 2.493782e+00 | 3.841622e+00 | 4.161723e+00 | ZERO3 | 2.493782e+00 |
| 27 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.207059e-08 | 2.173884e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Bcast() | 0.000000e+00 |
| 28 | 3.254461e+00 | 3.126972e+00 | 3.172951e+00 | 5.748798e+01 | 4.291667e+01 | 3.254461e+00 | 3.254461e+00 | 3.126972e+00 | 3.126972e+00 | 3.172951e+00 | 3.172951e+00 | 9.083516e-01 | 8.217146e-01 | 1.172540e+00 | 1.261177e+00 | MPI_Wait() | 8.217146e-01 |
| 29 | 3.254461e+00 | 3.126972e+00 | 3.172951e+00 | 5.748798e+01 | 4.291667e+01 | 3.254461e+00 | 3.254461e+00 | 3.126972e+00 | 3.126972e+00 | 3.172951e+00 | 3.172951e+00 | 9.083516e-01 | 8.217146e-01 | 1.172540e+00 | 1.261177e+00 | MPI_Irecv() | 8.217146e-01 |
| 30 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.727081e-08 | 1.981692e-08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | MPI_Comm_rank() | 0.000000e+00 |
| 31 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.600118e-08 | 1.299979e-07 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | NORM2U3 | 0.000000e+00 |
problem_sizes: list[str] = ["D"]
processes: list[int] = [256]
rawDF_cg_cDp256: pd.DataFrame = return_rawDF_with_init_param(
benchmark_name="cg",
classes=problem_sizes,
processes=processes,
csv_dir_path=csvDirPath,
)
# rawDF_cg_cDp256 = rawDF_cg_cDp256.set_index("functionName")
# rawDF_cg_cDp256["functionCallNum"].plot.pie()
fig = px.pie(rawDF_cg_cDp256, values="functionCallNum", names="functionName")
fig.show()
/usr/local/lib/python3.10/site-packages/plotly/io/_renderers.py:395: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
problem_sizes: list[str] = ["D"]
processes: list[int] = [256]
rawDF_ep_cDp256: pd.DataFrame = return_rawDF_with_init_param(
benchmark_name="ep",
classes=problem_sizes,
processes=processes,
csv_dir_path=csvDirPath,
)
# rawDF_mg_cDp256 = rawDF_mg_cDp256.set_index("functionName")
# rawDF_mg_cDp256["functionCallNum"].plot.pie()
fig = px.pie(rawDF_ep_cDp256, values="functionCallNum", names="functionName")
fig.show()
/usr/local/lib/python3.10/site-packages/plotly/io/_renderers.py:395: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
problem_sizes: list[str] = ["D"]
processes: list[int] = [256]
rawDF_is_cDp256: pd.DataFrame = return_rawDF_with_init_param(
benchmark_name="is",
classes=problem_sizes,
processes=processes,
csv_dir_path=csvDirPath,
)
# rawDF_mg_cDp256 = rawDF_mg_cDp256.set_index("functionName")
# rawDF_mg_cDp256["functionCallNum"].plot.pie()
fig = px.pie(rawDF_is_cDp256, values="functionCallNum", names="functionName")
fig.show()
/usr/local/lib/python3.10/site-packages/plotly/io/_renderers.py:395: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
problem_sizes: list[str] = ["D"]
processes: list[int] = [256]
rawDF_mg_cDp256: pd.DataFrame = return_rawDF_with_init_param(
benchmark_name="mg",
classes=problem_sizes,
processes=processes,
csv_dir_path=csvDirPath,
)
# rawDF_mg_cDp256 = rawDF_mg_cDp256.set_index("functionName")
# rawDF_mg_cDp256["functionCallNum"].plot.pie()
fig = px.pie(rawDF_mg_cDp256, values="functionCallNum", names="functionName")
fig.show()
/usr/local/lib/python3.10/site-packages/plotly/io/_renderers.py:395: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
# NPB_CG
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["D"]
weightedMAPEatCG: float = returnWeightedMapeScoreFromCondition(
benchmarkName="cg",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatCG
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
174.81351700577324
# NPB_CG
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C", "D", "E"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["F"]
weightedMAPEatCG: float = returnWeightedMapeScoreFromCondition(
benchmarkName="cg",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatCG
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
24.553703881354036
# NPB_MG
train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
train_npb_sizes: list[str] = ["A", "B", "C"]
test_npb_processes: list[int] = [256]
test_npb_sizes: list[str] = ["D"]
weightedMAPEatMG: float = returnWeightedMapeScoreFromCondition(
benchmarkName="mg",
trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
list_modelName=list_modelName,
csvDirPath=csvDirPath,
)
weightedMAPEatMG
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
7024.080516840863
# # NPB_MG
# train_npb_processes: list[int] = [2, 4, 8, 16, 32, 64, 128]
# train_npb_sizes: list[str] = ["A", "B", "C", "D"]
# test_npb_processes: list[int] = [256]
# test_npb_sizes: list[str] = ["E"]
# weightedMAPEatMG: float = returnWeightedMapeScoreFromCondition(
# benchmarkName="mg",
# trainCondition={"processes": train_npb_processes, "sizes": train_npb_sizes},
# testCondition={"processes": test_npb_processes, "sizes": test_npb_sizes},
# list_modelName=list_modelName,
# csvDirPath=csvDirPath,
# )
# weightedMAPEatMG
test_Model_squareRootOfProcess_ForMultipleRegression()
%reset -f
# jupyter_pwd = %pwd
# if jupyter_pwd == "/":
# %cd /workspace
# ipynb形式のライブラリのインポート
%run ./lib/lib.ipynb
# 生データの入ったCSVファイルの保持されたディレクトリ名を格納している変数
csvDirPath = "./csv_files/"
# NPBのベンチマーク名のリスト
benchmarkNames = ["cg", "ep", "ft", "is", "lu", "mg"]
# LULESH ベンチマークプログラムのプロセス数・問題サイズ・イテレーション数
lulesh_processes: list[int] = [8, 27, 64, 125, 216, 343, 512]
lulesh_iterations: list[int] = [8, 16, 32, 64, 128, 256]
lulesh_sizes: list[int] = [16, 24, 32, 48, 64, 128]
DEBUG:__main__:hello
date: str = "2022年8月12日"
list_modelName: list[str] = [
"modelIp",
"modelLog",
"modelLinAndIp",
"modelLinAndLog",
"modelIpAndLin",
"modelIpAndLog",
"modelLogAndLin",
"modelLogAndIp",
"modelProcessDividedByProblemSize",
"modelProblemSizeDividedByProcess",
"modelLinearSumOf2elementCombination",
"modelLinearSumOfElementCombinations",
"modelLinearSumOf2elementCombinationWithSquared",
"modelLinearSumOf2elementCombinationWithCubed",
"modelSquareRootOfProcess",
"modelSquareRootTimesOtherElems",
"modelObeyOneParameter",
"modelLin"
# "modelBasicTree",
]
input_list_process: list[int] = [2, 4, 8, 16, 32, 64, 128]
target_list_process: list[int] = [256]
cg_input_list_na: list[int] = [14000, 30000, 75000, 100000]
cg_input_list_nonzer: list[int] = [11, 12, 13, 14, 15, 18]
cg_input_list_niter: list[int] = [15, 30, 75, 90]
cg_input_list_shift: list[int] = [20, 40, 60, 80, 110]
cg_target_list_na: list[int] = [1500000]
cg_target_list_nonzer: list[int] = [21]
cg_target_list_niter: list[int] = [100]
cg_target_list_shift: list[int] = [200]
mg_input_list_problem_size: list[int] = [32, 64, 128, 256]
mg_input_list_nit: list[int] = [4, 10, 20, 35]
mg_target_list_problem_size: list[int] = [512]
mg_target_list_nit: list[int] = [50]
input_rawDF_cg: pd.DataFrame = return_rawDF_cg(
list_process=input_list_process,
list_na=cg_input_list_na,
list_nonzer=cg_input_list_nonzer,
list_niter=cg_input_list_niter,
list_shift=cg_input_list_shift,
csvDir=csvDirPath,
)
target_rawDF_cg: pd.DataFrame = return_rawDF_cg(
list_process=target_list_process,
list_na=cg_target_list_na,
list_nonzer=cg_target_list_nonzer,
list_niter=cg_target_list_niter,
list_shift=cg_target_list_shift,
csvDir=csvDirPath,
)
/tmp/ipykernel_207/3490495865.py:46: UserWarning: ./csv_files/cg_na75000_nonzer18_niter30_shift60_process4.csv is empty. /tmp/ipykernel_207/3490495865.py:46: UserWarning: ./csv_files/cg_na75000_nonzer15_niter90_shift80_process8.csv is empty.
cg_list_exp: list[str] = ["process", "na", "nonzer", "niter", "shift"]
list_res: list[str] = ["#Call"]
# 精度の低い関数を抽出したうえでチューニングする
targetFunctionNames: list[str] = [
"VECSET",
"MPI_Wait()",
"MPI_Send()",
"SPRNVC",
"RANDLC",
"MPI_Irecv()",
"ICNVRT",
]
result_series_list: list[pd.DataFrame] = []
function_names: list[str] = list(set(input_rawDF_cg["Name"].tolist()))
input_rawDF_cg = input_rawDF_cg.rename(columns={"Name": "functionName"})
target_rawDF_cg = target_rawDF_cg.rename(columns={"Name": "functionName"})
for function_name in function_names:
if (function_name in targetFunctionNames) == False:
continue
input_rawDF_per_function: pd.DataFrame = input_rawDF_cg[
input_rawDF_cg["functionName"] == function_name
]
models = Models(
inputDF=input_rawDF_per_function,
expVarColNames=cg_list_exp,
resVarColNames=list_res,
targetDF=None,
modelNames=list_modelName,
)
models.setUpDataBeforeCalcLr()
models.calcLr()
models.calcMAPE()
dictCalcedMAPE = models.returnCalculatedMAPE()
for key in dictCalcedMAPE.keys():
dictCalcedMAPE[key] = float(dictCalcedMAPE[key])
dict_for_series: dict = copy.deepcopy(dictCalcedMAPE)
dict_for_series["functionName"] = function_name
series: pd.Series = pd.Series(dict_for_series)
result_series_list.append(series)
resultDF: pd.DataFrame = pd.DataFrame(result_series_list)
resultDF = addLowestMAPEColumn(
inputDF=resultDF, model_name_list=list_modelName, version=2
)
resultDF = addLowestMAPEsModelNameColumn(
inputDF=resultDF, model_name_list=list_modelName, version=2
)
/usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated /usr/local/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py:881: OptimizeWarning: Covariance of the parameters could not be estimated
resultDF
| modelLin | modelIp | modelLog | modelProcessDividedByProblemSize | modelProblemSizeDividedByProcess | modelLinAndIp | modelLinAndLog | modelIpAndLin | modelIpAndLog | modelLogAndLin | ... | modelLinearSumOf2elementCombination | modelLinearSumOfElementCombinations | modelLinearSumOf2elementCombinationWithSquared | modelLinearSumOf2elementCombinationWithCubed | modelSquareRootOfProcess | modelSquareRootTimesOtherElems | modelObeyOneParameter | functionName | 最低値 | 最適モデル | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 3.425747e+01 | 52.562966 | 45.284269 | 48.827706 | 381.319302 | 57.396654 | 44.259877 | 4.179520e+01 | 45.842553 | 4.102758e+01 | ... | 23.419225 | 1.193837e+01 | 26.893264 | 33.968244 | 3.761452e+01 | 63.622956 | 34.257466 | MPI_Send() | 11.938374 | modelLinearSumOfElementCombinations |
| 1 | 2.550709e+01 | 63.602611 | 43.918416 | 68.457739 | 68.707184 | 63.602603 | 43.918418 | 2.550710e+01 | 43.918426 | 2.550709e+01 | ... | 13.725285 | 1.353524e+01 | 26.548026 | 36.391518 | 2.550709e+01 | 110.789284 | 25.507090 | ICNVRT | 13.535235 | modelLinearSumOfElementCombinations |
| 2 | 2.550716e+01 | 63.602569 | 43.918421 | 68.457716 | 68.703722 | 63.602561 | 43.918423 | 2.550717e+01 | 43.918430 | 2.550716e+01 | ... | 13.725277 | 1.353524e+01 | 26.547929 | 36.391398 | 2.550716e+01 | 110.789118 | 25.507161 | RANDLC | 13.535239 | modelLinearSumOfElementCombinations |
| 3 | 1.056736e-13 | 40.738362 | 24.184347 | 59.575073 | 95.488585 | 40.738362 | 24.184347 | 3.109564e-14 | 24.184348 | 3.032598e-14 | ... | 14.024686 | 1.606494e-12 | 19.369661 | 25.924923 | 3.326790e-13 | 79.407704 | 0.000000 | SPRNVC | 0.000000 | modelObeyOneParameter |
| 4 | 3.425747e+01 | 52.562966 | 45.284269 | 48.827706 | 381.319302 | 57.396654 | 44.259877 | 4.179520e+01 | 45.842553 | 4.102758e+01 | ... | 23.419225 | 1.193837e+01 | 26.893264 | 33.968244 | 3.761452e+01 | 63.622956 | 34.257466 | MPI_Wait() | 11.938374 | modelLinearSumOfElementCombinations |
| 5 | 3.425747e+01 | 52.562966 | 45.284269 | 48.827706 | 381.319302 | 57.396654 | 44.259877 | 4.179520e+01 | 45.842553 | 4.102758e+01 | ... | 23.419225 | 1.193837e+01 | 26.893264 | 33.968244 | 3.761452e+01 | 63.622956 | 34.257466 | MPI_Irecv() | 11.938374 | modelLinearSumOfElementCombinations |
| 6 | 1.056736e-13 | 40.738362 | 24.184347 | 59.575073 | 95.488585 | 40.738362 | 24.184347 | 3.109564e-14 | 24.184348 | 3.032598e-14 | ... | 14.024686 | 1.606494e-12 | 19.369661 | 25.924923 | 3.326790e-13 | 79.407704 | 0.000000 | VECSET | 0.000000 | modelObeyOneParameter |
7 rows × 21 columns
df_ICNVRT = input_rawDF_cg[input_rawDF_cg["functionName"] == "ICNVRT"]
df_Wait = input_rawDF_cg[input_rawDF_cg["functionName"] == "MPI_Wait()"]
df_Send = input_rawDF_cg[input_rawDF_cg["functionName"] == "MPI_Send()"]
df_RANDLC = input_rawDF_cg[input_rawDF_cg["functionName"] == "RANDLC"]
df_VECSET = input_rawDF_cg[input_rawDF_cg["functionName"] == "VECSET"]
df_Irecv = input_rawDF_cg[input_rawDF_cg["functionName"] == "MPI_Irecv()"]
df_SPRNVC = input_rawDF_cg[input_rawDF_cg["functionName"] == "SPRNVC"]
# SPRNVC のデータで Model_obeyOneParameter_ForMultipleRegression を用いて予測を行う
# df_SPRNVC
print(df_SPRNVC[cg_list_exp].head())
print(df_SPRNVC[list_res].head())
object_obeyOneParameter = Model_obeyOneParameter_ForMultipleRegression(
inputDF=df_SPRNVC,
explanatoryVariableColumnNames=cg_list_exp,
responseVariableColumnNames=list_res,
conditionDictForTest={},
targetDF=None,
)
object_obeyOneParameter.build_model()
_return_expect: np.ndarray = object_obeyOneParameter.rawResponseVariable[
object_obeyOneParameter.responseVariableColumnNames
].values
_return_actually: np.ndarray = object_obeyOneParameter.predict(
object_obeyOneParameter.rawExplanaoryVariable
)
process na nonzer niter shift
7 2 14000 11 15 20
7 2 14000 11 15 40
7 2 14000 11 15 60
7 2 14000 11 15 80
7 2 14000 11 15 110
#Call
7 14000.0
7 14000.0
7 14000.0
7 14000.0
7 14000.0
_return_actually
array([[ 14000],
[ 14000],
[ 14000],
...,
[100000],
[100000],
[100000]])
_return_expect
array([[ 14000.],
[ 14000.],
[ 14000.],
...,
[100000.],
[100000.],
[100000.]])
test_Model_obeyOneParameter_ForMultipleRegression()